/* Luxury light-mode styling for Obsidian Fragrances */
:root {
    --bg: #f7f5f0;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --text: #1e1a17;
    --muted: #7b7371;
    --border: rgba(30, 26, 23, 0.12);
    --gold: #c8a166;
    --shadow: 0 24px 55px rgba(30, 26, 23, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 32%), linear-gradient(180deg, #faf8f5 0%, #f2efe9 100%);
    color: var(--text);
    animation: pageReveal 0.55s ease both;
}

img {
    max-width: 100%;
}

.site-header {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.88);
    z-index: 1000;
    animation: headerDrop 0.65s ease both;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.06em;
    align-items: center;
    display: inline-flex;
    min-width: 0;
    white-space: normal;
}

.brand-mark {
    display: inline-block;
    width: 2.4rem;
    height: 2.4rem;
    line-height: 2.4rem;
    border-radius: 50%;
    text-align: center;
    margin-right: 0.5rem;
    background: #f5f1eb;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-link {
    color: var(--text) !important;
    font-weight: 500;
}

.nav-link.active,
.nav-link:hover {
    color: var(--gold) !important;
}

.hero-section {
    min-height: 84vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 241, 218, 0.3), transparent 25%), radial-gradient(circle at bottom right, rgba(200, 161, 102, 0.08), transparent 20%);
    pointer-events: none;
}

.hero-card,
.product-card,
.track-card,
.order-card,
.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-product-card {
    max-width: 540px;
    margin-left: auto;
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.hero-product-card:hover {
    transform: translateY(-8px);
}

.hero-product-image {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    min-height: 0;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 245, 240, 0.88));
    overflow: hidden;
}

.hero-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    mix-blend-mode: normal;
    filter: drop-shadow(0 22px 28px rgba(30, 26, 23, 0.14));
    transition: transform 0.5s ease;
}

.hero-product-card:hover .hero-product-image img {
    transform: translateY(-2px);
}

.hero-product-meta {
    flex-wrap: wrap;
}

.hero-product-meta .fw-bold {
    white-space: nowrap;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 5vw, 4.8rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
}

.hero-subtitle {
    color: var(--muted);
    max-width: 33rem;
}

.btn-gold {
    background: linear-gradient(135deg, #d7b56d, #b49257);
    border: none;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b49257, #d9b86e);
    transform: translateY(-2px);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-image-frame {
    display: grid;
    place-items: center;
    width: calc(100% - 1.5rem);
    aspect-ratio: 4 / 5;
    margin: 0.75rem auto 0;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 245, 240, 0.96));
    border: 1px solid rgba(200, 161, 102, 0.22);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68), 0 16px 28px rgba(30, 26, 23, 0.08);
    transition: transform 0.38s ease, box-shadow 0.38s ease, border-color 0.38s ease;
}

.product-image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.28) 42%, transparent 64%);
    opacity: 0;
    transform: translateX(-45%);
    transition: opacity 0.38s ease, transform 0.65s ease;
    pointer-events: none;
    z-index: 2;
}

.product-image-frame::after {
    content: '';
    position: absolute;
    inset: auto 16px 14px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(30, 26, 23, 0.22), transparent 68%);
    filter: blur(8px);
    opacity: 0.28;
    pointer-events: none;
}

.product-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    mix-blend-mode: normal;
    filter: saturate(1.03) contrast(1.02);
    transition: transform 0.42s ease, filter 0.42s ease;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card {
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.45), transparent 38%, rgba(200, 161, 102, 0.08));
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
}

.product-card:active {
    transform: translateY(-6px) scale(0.99);
}

.product-card:hover,
.product-card:focus-within {
    transform: translateY(-12px) scale(1.015);
    box-shadow: 0 30px 70px rgba(30, 26, 23, 0.12);
    border-color: rgba(200, 161, 102, 0.35);
}

.product-card:hover::before,
.product-card:focus-within::before {
    opacity: 1;
}

.product-card:hover .product-image-frame,
.product-card:focus-within .product-image-frame {
    transform: translateY(-3px);
    border-color: rgba(200, 161, 102, 0.46);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76), 0 22px 42px rgba(30, 26, 23, 0.12);
}

.product-card:hover .product-image-frame::before,
.product-card:focus-within .product-image-frame::before {
    opacity: 1;
    transform: translateX(45%);
}

.product-card:hover img,
.product-card:focus-within img {
    transform: translateY(-2px);
    filter: saturate(1.08) contrast(1.04);
}

.product-card.is-pressed {
    animation: perfumePress 0.38s ease;
}

.product-card.is-pressed .product-image-frame {
    animation: imagePulse 0.38s ease;
}

.product-badge {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(200, 161, 102, 0.24);
}

.form-control,
.form-select {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

input::placeholder,
textarea::placeholder {
    color: #b7aea7;
}

.product-card .btn {
    border-radius: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card .btn:hover {
    transform: translateY(-2px);
}

.product-actions {
    gap: 0.75rem;
}

.best-seller-item {
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.best-seller-item:hover {
    transform: translateX(6px);
    box-shadow: 0 16px 34px rgba(30, 26, 23, 0.08);
    border-color: rgba(200, 161, 102, 0.3) !important;
}

.best-seller-image {
    width: 95px;
    height: 95px;
    object-fit: contain;
    padding: 0.45rem;
    mix-blend-mode: multiply;
    background: rgba(255, 255, 255, 0.68);
}

.card-body p {
    color: var(--muted);
}

.product-card .card-body {
    position: relative;
    z-index: 1;
}

.product-card h5 {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.product-card .card-body p,
.best-seller-item p,
.hero-product-meta p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
    }

    .hero-product-card {
        margin: 2rem auto 0;
    }

    .site-header .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.55rem;
    }

    .hero-section .container {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }

    .featured-search {
        gap: 0.65rem;
    }

    .featured-search .form-control {
        margin-right: 0 !important;
    }

    .featured-search,
    .hero-product-meta,
    .best-seller-item {
        align-items: stretch !important;
        flex-direction: column;
    }

    .featured-search .btn,
    .product-actions .btn,
    .shop-filters .btn {
        width: 100%;
    }

    .shop-filters {
        display: grid;
        gap: 0.55rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 1rem;
        text-align: center !important;
    }

    .shop-filters .btn {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .best-seller-image {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.cart-table th,
.cart-table td {
    vertical-align: middle;
}

.track-card {
    padding: 2rem;
}

.admin-sidebar {
    min-height: calc(100vh - 3.5rem);
    background: rgba(247, 244, 239, 0.85);
    border-right: 1px solid rgba(0,0,0,.06);
}

.admin-link {
    color: #4e473e;
}

.admin-link:hover,
.admin-link.active {
    color: var(--gold);
}

.alert-soft {
    background: rgba(248, 243, 236, 0.9);
    border-color: rgba(200, 161, 102, 0.25);
}

.btn-soft {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border: 1px solid rgba(0,0,0,0.05);
}

.btn-soft:hover {
    background: #fff;
}

@media (max-width: 575px) {
    .main-content {
        padding-top: 4.75rem !important;
    }

    .navbar-brand {
        font-size: 1rem;
        max-width: calc(100vw - 5.5rem);
    }

    .brand-mark {
        width: 2.05rem;
        height: 2.05rem;
        line-height: 2.05rem;
        margin-right: 0.35rem;
    }

    .hero-title {
        font-size: 2.15rem;
    }

    .hero-subtitle {
        font-size: 0.96rem;
    }

    .hero-card,
    .product-card,
    .track-card,
    .order-card,
    .admin-card {
        border-radius: 20px;
    }

    .product-image-frame {
        width: calc(100% - 1rem);
        border-radius: 18px;
    }

    .product-actions {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .product-actions strong {
        width: 100%;
    }

    .product-card .card-body {
        padding: 1.1rem;
    }

    .section-title {
        font-size: 1.65rem;
    }
}

@media (max-width: 390px) {
    .shop-filters {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.95rem;
    }
}

@keyframes pageReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes headerDrop {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes perfumePress {
    0% {
        transform: translateY(-12px) scale(1.015);
    }
    45% {
        transform: translateY(-6px) scale(0.985);
    }
    100% {
        transform: translateY(-12px) scale(1.015);
    }
}

@keyframes imagePulse {
    0% {
        box-shadow: inset 0 0 0 1px rgba(200, 161, 102, 0.22), 0 18px 36px rgba(30, 26, 23, 0.08);
    }
    45% {
        box-shadow: inset 0 0 0 2px rgba(200, 161, 102, 0.45), 0 22px 42px rgba(30, 26, 23, 0.12);
    }
    100% {
        box-shadow: inset 0 0 0 1px rgba(200, 161, 102, 0.22), 0 18px 36px rgba(30, 26, 23, 0.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
