/* ============================================================
   WEBSITE      : LUXOR
   FILE         : public/css/style.css
   MÔ TẢ        : CSS chính cho mặt ngoài cửa hàng (Storefront)
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --primary: #8B7355;
    --primary-dark: #705C44;
    --primary-light: #A89073;
    --secondary: #B39B7A;
    --accent: #B39B7A;
    --bg-dark: #F8F7F4;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1EFEA;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: #E7E2DA;
    --glass-shadow: rgba(0, 0, 0, 0.03);
    --text-primary: #2F2F2F;
    --text-secondary: #7B756F;
    --text-muted: #ABA6A1;
    --input-bg: #FFFFFF;
    --input-border: #E7E2DA;
    --input-focus: rgba(139, 115, 85, 0.4);
    --success: #3C7A59;
    --warning: #D29A28;
    --danger: #C45454;
    --info: #7B756F;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: 0.2s ease-in-out;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .logo, .section-title, .cart-title-flex h2 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Background animated glow orbs */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bg-glow::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.03) 0%, transparent 70%);
}
.bg-glow::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(179, 155, 122, 0.02) 0%, transparent 70%);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* ─── Typography & Utilities ─── */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* ─── Header Navbar ─── */
.header-nav {
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
    position: relative;
    cursor: pointer;
}

.action-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(139, 115, 85, 0.2);
}

/* ─── Hero Banner ─── */
.hero-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--glass-border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-subtitle {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: block;
}

.hero-title {
    font-size: 54px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
    max-width: 480px;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.08) 0%, transparent 70%);
    z-index: 0;
}

.hero-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 1;
    border-radius: var(--radius-md);
    transform: rotate(-3deg);
    transition: var(--transition);
}

.hero-image:hover {
    transform: rotate(0) scale(1.03);
}

/* ─── Product Grids & Cards ─── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-card-hover);
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img {
    transform: scale(1.08);
}

.badge-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
}

.badge-tag-hot {
    background: var(--primary);
    color: white;
}

.badge-tag-discount {
    background: var(--secondary);
    color: white;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.card-cat {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.card-price-new {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

.card-price-old {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(139, 115, 85, 0.15);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.12);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

/* ─── Product Detail Page ─── */
.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image-container {
    width: 100%;
    aspect-ratio: 1.1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card-hover);
    border: 1px solid var(--glass-border);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card-hover);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.thumb-item.active, .thumb-item:hover {
    border-color: var(--primary);
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 12px;
}

.detail-pricing {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    padding: 16px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.detail-price-new {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

.detail-price-old {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.variant-section {
    margin-bottom: 24px;
}

.variant-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-option-pill {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.variant-option-pill:hover {
    border-color: var(--primary-light);
}

.variant-option-pill.active {
    border-color: var(--primary);
    background: rgba(139, 115, 85, 0.1);
    color: var(--text-primary);
}

.variant-option-pill.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--glass-border);
    background: none;
}

.color-dot-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    width: 120px;
    height: 44px;
}

.qty-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    color: var(--text-primary);
}

.qty-val {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

/* ─── Cart Page ─── */
.cart-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.cart-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--glass-shadow);
}

.cart-title-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 700;
    font-size: 15px;
}

.cart-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.cart-item-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 16px;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-row-total {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    border-top: 1px dashed var(--glass-border);
    padding-top: 16px;
    margin-top: 8px;
}

/* ─── Forms & Tables ─── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--input-focus);
}

/* Payment options checkout card */
.payment-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.payment-option-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option-card:hover {
    border-color: var(--primary-light);
}

.payment-option-card.active {
    border-color: var(--primary);
    background: rgba(139, 115, 85, 0.05);
}

.payment-radio {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ─── Footer ─── */
.footer-store {
    background: #F1EFEA;
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(0, 200, 83, 0.08);
    color: var(--success);
    border: 1px solid rgba(0, 200, 83, 0.15);
}

.alert-danger {
    background: rgba(255, 23, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(255, 23, 68, 0.15);
}

.alert-warning {
    background: rgba(255, 171, 0, 0.08);
    color: var(--warning);
    border: 1px solid rgba(255, 171, 0, 0.15);
}

/* Responsive Grid Adjustments */
@media (max-width: 992px) {
    .hero-grid, .detail-grid, .cart-grid {
        grid-template-columns: 1fr;
    }
    .hero-image-wrapper {
        order: -1;
    }
    .nav-menu {
        display: none; /* simple toggle can be made or hidden */
    }
}

/* Action Button for Storefront (e.g. Delete in Cart) */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-action:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.btn-action-delete:hover {
    color: var(--danger);
    border-color: rgba(255, 23, 68, 0.2);
}
