:root {
    color-scheme: light;

    --color-bg-start: #fffdfb;
    --color-bg-middle: #faf7f4;
    --color-surface: #ffffff;
    --color-surface-soft: #faf7f4;
    --color-surface-muted: #f3efec;

    --color-text: #222222;
    --color-muted: #68615d;
    --color-heading: #222222;

    --color-border-soft: #e8dfda;
    --color-hover-soft: #eee5df;

    --color-accent: #965d45;
    --color-accent-soft: #f1e7e0;

    --color-navbar: rgba(255, 255, 255, 0.94);
    --color-footer: #202020;
    --color-footer-text: #ffffff;

    --color-input-bg: #ffffff;
    --color-disabled-bg: #f3efec;

    --color-shadow:
        rgba(31, 31, 31, 0.08);
    
    --color-surface-glass: rgba(255, 255, 255, 0.78);
    --color-footer-muted: #cfcfcf;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --color-bg-start: #121212;
    --color-bg-middle: #171717;
    --color-surface: #1f1f1f;
    --color-surface-soft: #252321;
    --color-surface-muted: #2c2927;

    --color-text: #f3efec;
    --color-muted: #b9b0aa;
    --color-heading: #fffaf7;

    --color-border-soft: #3d3835;
    --color-hover-soft: #34302d;

    --color-accent: #d49a7d;
    --color-accent-soft: #392b25;

    --color-navbar: rgba(24, 24, 24, 0.96);
    --color-footer: #0b0b0b;
    --color-footer-text: #f7f3ef;

    --color-input-bg: #242424;
    --color-disabled-bg: #302d2b;

    --color-shadow:
        rgba(0, 0, 0, 0.35);

    --color-surface-glass: rgba(24, 24, 24, 0.88);
    --color-footer-muted: #aaa29d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Inter", Arial, sans-serif;
    color: var(--color-text);
    background: linear-gradient(
        180deg,
        var(--color-bg-start) 0%,
        var(--color-bg-middle) 45%,
        var(--color-bg-start) 100%
    );
}

body > main {
    flex: 1 0 auto;
}

.glass-navbar {
    padding: 18px 0;
    background: var(--color-surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--color-border-soft);
    box-shadow: 0 8px 30px rgba(31, 31, 31, 0.04);
}

.navbar-brand {
    font-family: "Playfair Display", serif;
    letter-spacing: 0.4px;
    font-size: 25px;
    color: var(--color-text);
}

.navbar-brand:hover {
    color: var(--color-accent);
}

.nav-link {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 16px !important;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--color-accent);
    background-color: var(--color-hover-soft);
}

.navbar .btn-dark {
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--color-text);
    border-color: var(--color-text);
    transition: all 0.2s ease;
}

.navbar .btn-dark:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.hero {
    padding: 120px 20px;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(138, 90, 68, 0.14), transparent 32%),
        linear-gradient(135deg, var(--color-bg-start), var(--color-bg-middle));
}

.eyebrow-text {
    margin-bottom: 14px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0 auto 22px;
    font-family: "Playfair Display", serif;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    color: var(--color-text);
}

.hero-description {
    max-width: 620px;
    margin: 0 auto 34px;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.7;
}

.hero-button {
    border-radius: 999px;
    padding: 13px 30px;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(31, 31, 31, 0.12);
}

.featured-section {
    padding: 90px 20px;
    text-align: center;
}

.featured-section h2 {
    margin-bottom: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(32px, 4vw, 48px);
    color: var(--color-text);
}

.category-quicklinks {
    background: var(--color-surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--color-border-soft);
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.03);
    padding: 18px 20px;
}

.category-quicklinks-inner {
    display: flex;
    align-items: center;
    gap: 22px;
}

.category-quicklinks-label {
    position: relative;
    flex: 0 0 auto;
    margin: 0;
    padding-right: 22px;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.category-quicklinks-label::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 18px;
    background: var(--color-border-soft);
    transform: translateY(-50%);
}

.category-quicklinks-track {
    display: flex;
    flex: 1 1 auto;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-quicklinks-track::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex: 0 0 auto;
    padding: 9px 20px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(31, 31, 31, 0.04);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.category-pill:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(150, 93, 69, 0.28);
}

.category-quicklinks-empty {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
}

@media (max-width: 576px) {
    .category-quicklinks-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.site-footer {
    margin-top: 80px;
    padding: 44px 0;
    text-align: center;
    background-color: var(--color-footer);
    color: var(--color-footer-text);
}

.footer-subtext {
    color: var(--color-footer-muted);
    font-size: 14px;
}

.page-section {
    padding: 90px 20px;
}

.catalogue-header {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.catalogue-header h1 {
    margin-bottom: 16px;
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 5vw, 56px);
    color: var(--color-text);
}

.catalogue-header p {
    color: var(--color-muted);
    font-size: 17px;
    line-height: 1.7;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 50px;
}

.product-card {
    position: relative;
    overflow: hidden;
    text-align: left;
    border: 1px solid var(--color-border-soft);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
    transition: all 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(31, 31, 31, 0.1);
}

.product-image-placeholder {
    height: 240px;
    background:
        radial-gradient(circle at 30% 20%, rgba(138, 90, 68, 0.22), transparent 28%),
        linear-gradient(135deg, #f1e4dc, #f9f6f2);
}

.product-card-body {
    padding: 24px;
}

.product-card-category {
    margin-bottom: 8px;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.product-card h2 {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.3;
    color: var(--color-text);
}

.product-card-description {
    margin-bottom: 22px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.6;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.product-card-price {
    margin: 0;
    color: var(--color-text);
    font-size: 18px;
    font-weight: 700;
}

.product-link {
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.product-link:hover {
    text-decoration: underline;
}

.product-detail-page {
    padding: 90px 20px;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.product-detail-image {
    min-height: 520px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 30% 20%, rgba(138, 90, 68, 0.24), transparent 28%),
        radial-gradient(circle at 70% 75%, rgba(31, 31, 31, 0.08), transparent 30%),
        linear-gradient(135deg, #f1e4dc, #f9f6f2);
    box-shadow: 0 24px 70px rgba(31, 31, 31, 0.08);
}

.product-detail-info {
    text-align: left;
}

.product-category {
    margin-bottom: 14px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.product-detail-info h1 {
    margin-bottom: 20px;
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    color: var(--color-text);
}

.product-price {
    margin: 0 0 24px;
    color: var(--color-text);
    font-size: 28px;
    font-weight: 700;
}

.product-description {
    max-width: 560px;
    margin-bottom: 34px;
    color: var(--color-muted);
    font-size: 17px;
    line-height: 1.8;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.add-to-cart-button {
    border-radius: 999px;
    padding: 13px 30px;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(31, 31, 31, 0.12);
}

.back-link {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.auth-page {
    padding: 90px 20px;
}

.auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 44px;
    border: 1px solid var(--color-border-soft);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 70px rgba(31, 31, 31, 0.08);
}

.auth-card h1 {
    margin-bottom: 16px;
    font-family: "Playfair Display", serif;
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.1;
    color: var(--color-text);
}

.auth-intro {
    margin-bottom: 30px;
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1.7;
}

.auth-card .form-label {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
}

.auth-card .form-control {
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--color-border-soft);
}

.auth-card .form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(138, 90, 68, 0.12);
}

.auth-button {
    width: 100%;
    border-radius: 999px;
    padding: 13px 30px;
    font-weight: 600;
}

.auth-switch-text {
    margin: 24px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
}

.auth-switch-text a {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch-text a:hover {
    text-decoration: underline;
}

.dashboard-page {
    padding: 90px 20px;
}

.dashboard-header {
    max-width: 760px;
    margin-bottom: 42px;
}

.dashboard-header h1 {
    margin-bottom: 16px;
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1;
    color: var(--color-text);
}

.dashboard-header .auth-intro {
    max-width: 620px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.dashboard-card {
    padding: 28px;
    border: 1px solid var(--color-border-soft);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
}

.dashboard-card h2 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--color-text);
}

.dashboard-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.7;
}

.admin-section {
    margin-top: 54px;
    padding: 34px;
    border: 1px solid var(--color-border-soft);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 70px rgba(31, 31, 31, 0.08);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}

.admin-section-header h2 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(28px, 4vw, 40px);
    color: var(--color-text);
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table-wrapper .table {
    margin-bottom: 0;
}

.admin-table-wrapper th {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table-wrapper td {
    color: var(--color-text);
    vertical-align: middle;
}

.product-card-image {
    width: 100%;
    height: 320px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.product-media-carousel {
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--color-border-soft);
}

.product-media-carousel .carousel-inner,
.product-media-carousel .carousel-item {
    width: 100%;
}

.product-carousel-media {
    width: 100%;
    height: 620px;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #f6f3ef;
}

.product-media-carousel .carousel-control-prev,
.product-media-carousel .carousel-control-next {
    width: 64px;
}

.product-media-carousel .carousel-control-prev-icon,
.product-media-carousel .carousel-control-next-icon {
    width: 42px;
    height: 42px;
    padding: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.65);
    background-size: 18px;
}

@media (max-width: 768px) {
    .product-carousel-media {
        height: 420px;
    }
}

.product-detail-image,
.product-detail-video {
    width: 100%;
    height: 420px;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 18px;
    background: var(--color-border-soft);
}

.product-media-gallery > :first-child {
    grid-column: 1 / -1;
    height: 560px;
}

.existing-media-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.existing-media-item {
    padding: 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: white;
}

.existing-media-preview {
    width: 100%;
    height: 110px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .product-media-gallery {
        grid-template-columns: 1fr;
    }

    .product-media-gallery > :first-child,
    .product-detail-image,
    .product-detail-video {
        height: 360px;
    }
}

.cart-count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.cart-page {
    padding: 90px 20px;
}

.cart-header {
    margin-bottom: 42px;
}

.cart-header h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(38px, 5vw, 58px);
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
    gap: 36px;
    align-items: start;
}

.cart-items {
    display: grid;
    gap: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
}

.cart-item-media img,
.cart-item-media .product-image-placeholder {
    width: 150px;
    height: 150px;
    display: block;
    object-fit: cover;
    border-radius: 16px;
}

.cart-item-details h2 {
    margin-bottom: 8px;
    font-family: "Playfair Display", serif;
    font-size: 24px;
}

.cart-item-price {
    color: var(--color-muted);
}

.cart-quantity-form {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
}

.cart-quantity-form label {
    font-size: 13px;
    font-weight: 600;
}

.cart-quantity-form .form-control {
    width: 85px;
}

.cart-item-total {
    font-size: 20px;
    font-weight: 700;
}

.cart-summary {
    position: sticky;
    top: 110px;
    padding: 30px;
    border: 1px solid var(--color-border-soft);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 20px 55px rgba(31, 31, 31, 0.08);
}

.cart-summary h2 {
    margin-bottom: 24px;
    font-family: "Playfair Display", serif;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.cart-summary-total {
    margin-bottom: 24px;
    border-bottom: none;
    font-size: 20px;
}

.cart-summary-note {
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.empty-cart {
    padding: 70px 30px;
    text-align: center;
    border: 1px solid var(--color-border-soft);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .cart-item-media img,
    .cart-item-media .product-image-placeholder {
        width: 90px;
        height: 90px;
    }

    .cart-item-total {
        grid-column: 2;
    }

    .cart-quantity-form {
        align-items: flex-start;
        flex-direction: column;
    }
}

.cart-offcanvas {
    --bs-offcanvas-width: 560px;

    width: min(560px, 46vw);
    border-left: 1px solid var(--color-border-soft);
    background: linear-gradient(
        180deg,
        var(--color-bg-middle),
        var(--color-bg-start)
    );
}

.cart-offcanvas .offcanvas-header {
    padding: 28px;
    border-bottom: 1px solid var(--color-border-soft);
}

.cart-offcanvas .offcanvas-header h2 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 32px;
}

.cart-offcanvas .offcanvas-body {
    padding: 24px;
}

.sidebar-cart-item {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.sidebar-cart-image img,
.sidebar-cart-image .product-image-placeholder {
    width: 90px;
    height: 90px;
    display: block;
    object-fit: cover;
    border-radius: 16px;
}

.sidebar-cart-details h3 {
    margin: 0 0 6px;
    font-family: "Playfair Display", serif;
    font-size: 19px;
}

.sidebar-cart-details p {
    margin-bottom: 10px;
    color: var(--color-muted);
    font-size: 13px;
}

.sidebar-quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 5px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
}

.quantity-button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-hover-soft);
    color: var(--color-text);
    font-size: 19px;
    cursor: pointer;
}

.quantity-button:hover {
    background: var(--color-accent);
    color: white;
}

.quantity-button:disabled {
    opacity: 0.45;
    cursor: wait;
}

.sidebar-cart-summary {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
}

.sidebar-cart-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
}

.sidebar-cart-total {
    margin: 8px 0 18px;
    padding-top: 18px !important;
    border-top: 1px solid var(--color-border-soft);
    font-size: 18px;
}

.empty-sidebar-cart {
    padding: 70px 20px;
    text-align: center;
}

.empty-sidebar-cart h3 {
    font-family: "Playfair Display", serif;
    font-size: 28px;
}

.empty-sidebar-cart p {
    color: var(--color-muted);
}

.product-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-card-actions form {
    margin: 0;
}

.product-card-cart-button {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .cart-offcanvas {
        width: min(520px, 60vw);
    }
}

@media (max-width: 768px) {
    .cart-offcanvas {
        width: min(460px, 92vw);
    }

    .sidebar-cart-item {
        grid-template-columns: 76px minmax(0, 1fr);
        align-items: start;
    }

    .sidebar-cart-image img,
    .sidebar-cart-image .product-image-placeholder {
        width: 76px;
        height: 76px;
    }

    .sidebar-cart-item > strong {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .cart-offcanvas {
        width: 100vw;
    }

    .cart-offcanvas .offcanvas-header {
        padding: 22px;
    }

    .cart-offcanvas .offcanvas-body {
        padding: 18px;
    }

    .sidebar-cart-item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 12px;
    }

    .sidebar-cart-image img,
    .sidebar-cart-image .product-image-placeholder {
        width: 68px;
        height: 68px;
    }

    .sidebar-cart-details h3 {
        font-size: 17px;
    }

    .sidebar-cart-summary {
        padding: 20px;
    }
}

@media (max-width: 1100px) {
    .cart-offcanvas {
        --bs-offcanvas-width: 520px;
        width: min(520px, 65vw);
    }
}

@media (max-width: 768px) {
    .cart-offcanvas {
        --bs-offcanvas-width: 92vw;
        width: 92vw;
    }

    .sidebar-cart-item {
        grid-template-columns: 76px minmax(0, 1fr);
        align-items: start;
    }

    .sidebar-cart-image img,
    .sidebar-cart-image .product-image-placeholder {
        width: 76px;
        height: 76px;
    }

    .sidebar-cart-item > strong {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .cart-offcanvas {
        --bs-offcanvas-width: 100vw;
        width: 100vw;
    }

    .cart-offcanvas .offcanvas-header {
        padding: 22px;
    }

    .cart-offcanvas .offcanvas-body {
        padding: 18px;
    }

    .sidebar-cart-item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 12px;
    }

    .sidebar-cart-image img,
    .sidebar-cart-image .product-image-placeholder {
        width: 68px;
        height: 68px;
    }

    .sidebar-cart-details h3 {
        font-size: 17px;
    }

    .sidebar-cart-summary {
        padding: 20px;
    }
}

.checkout-page,
.confirmation-page {
    padding: 90px 20px;
}

.checkout-header {
    max-width: 720px;
    margin-bottom: 42px;
}

.checkout-header h1,
.confirmation-card h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(38px, 5vw, 58px);
}

.checkout-header p {
    color: var(--color-muted);
    line-height: 1.7;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
    gap: 36px;
    align-items: start;
}

.checkout-form-card,
.checkout-summary,
.confirmation-card {
    padding: 34px;
    border: 1px solid var(--color-border-soft);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 22px 60px rgba(31, 31, 31, 0.07);
}

.checkout-form-card .form-control {
    padding: 13px 14px;
    border-color: var(--color-border-soft);
    border-radius: 14px;
}

.checkout-form-card .form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(138, 90, 68, 0.12);
}

.checkout-submit-button {
    width: 100%;
    margin-top: 24px;
    padding: 13px 24px;
    border-radius: 999px;
}

.checkout-summary {
    position: sticky;
    top: 110px;
}

.checkout-summary-item,
.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.checkout-summary-item small {
    display: block;
    margin-top: 4px;
    color: var(--color-muted);
}

.checkout-summary-total {
    border-bottom: none;
    font-size: 19px;
}

.confirmation-card {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.confirmation-card p {
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1.8;
}

@media (max-width: 850px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }
}

.checkout-form-card .form-select {
    padding: 13px 14px;
    border-color: var(--color-border-soft);
    border-radius: 14px;
}

.checkout-form-card .form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(138, 90, 68, 0.12);
}

.postcode-status {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-muted);
}

.postcode-success {
    color: #367447;
}

.postcode-error {
    color: #b42318;
}

.account-orders-section {
    margin-top: 54px;
}

.account-orders-header {
    margin-bottom: 24px;
}

.account-orders-header h2 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 4vw, 42px);
}

.account-orders-list {
    display: grid;
    gap: 24px;
}

.account-order-card {
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 35px rgba(31, 31, 31, 0.05);
}

.account-order-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.account-order-toggle:hover {
    background: #faf7f4;
}

.account-order-reference {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 21px;
    font-weight: 700;
}

.account-order-date {
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 12px;
}

.account-order-toggle-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-order-status {
    padding: 7px 13px;
    border-radius: 999px;
    background: #f1e7e0;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
}

.collapse-symbol {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border-soft);
    border-radius: 50%;
    font-size: 19px;
}

.account-order-toggle.collapsed .collapse-symbol::before {
    content: "+";
}

.account-order-toggle:not(.collapsed) .collapse-symbol::before {
    content: "−";
}

.account-order-details {
    padding: 0 26px 26px;
    border-top: 1px solid var(--color-border-soft);
}

.order-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 26px;
}

.order-page-link {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: 9px;
    background: white;
    color: var(--color-text);
    font-size: 13px;
    text-decoration: none;
}

.order-page-link:hover,
.order-page-link.active {
    border-color: #222222;
    background: #222222;
    color: white;
}

.order-page-dots {
    padding: 0 4px;
    color: var(--color-muted);
}

@media (max-width: 600px) {
    .account-order-toggle {
        align-items: flex-start;
        padding: 20px;
    }

    .account-order-toggle-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .account-order-status {
        display: none;
    }

    .account-order-details {
        padding: 0 20px 20px;
    }
}

.account-order-reference {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 24px;
    font-weight: 700;
}

.account-order-date {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 13px;
}

.account-order-status {
    padding: 7px 13px;
    border-radius: 999px;
    background: #f1e7e0;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
}

.account-order-items {
    padding: 10px 0;
}

.account-order-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.account-order-item small {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
}

.account-order-address,
.account-order-message {
    margin-top: 20px;
    padding: 18px;
    border-radius: 16px;
    background: #faf7f4;
}

.account-order-address span,
.account-order-message span {
    display: block;
    margin-bottom: 7px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.account-order-address p,
.account-order-message p {
    margin: 0;
    line-height: 1.7;
}

.account-order-totals {
    margin-top: 22px;
    margin-left: auto;
    max-width: 340px;
}

.account-order-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
}

.account-order-total {
    margin-top: 8px;
    padding-top: 16px !important;
    border-top: 1px solid var(--color-border-soft);
    font-size: 18px;
}

.account-orders-empty {
    padding: 60px 24px;
    border: 1px solid var(--color-border-soft);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.account-orders-empty h3 {
    font-family: "Playfair Display", serif;
    font-size: 28px;
}

.account-orders-empty p {
    color: var(--color-muted);
}

@media (max-width: 600px) {
    .account-order-card {
        padding: 22px;
    }

    .account-order-top,
    .account-order-item {
        flex-direction: column;
    }

    .account-order-totals {
        max-width: none;
    }
}

.account-profile-section {
    margin-top: 44px;
}

.account-section-heading,
.account-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 22px;
}

.account-section-heading h2,
.account-orders-header h2 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 4vw, 42px);
}

.account-section-heading > p,
.account-orders-header > p {
    max-width: 400px;
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.account-profile-card {
    padding: 32px;
    border: 1px solid var(--color-border-soft);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 48px rgba(31, 31, 31, 0.06);
}

.account-profile-card .form-control,
.account-profile-card .form-select {
    padding: 13px 14px;
    border-color: var(--color-border-soft);
    border-radius: 13px;
}

.account-profile-card .form-control:focus,
.account-profile-card .form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(138, 90, 68, 0.12);
}

.account-readonly-field {
    background: #f3efec;
    color: var(--color-muted);
    cursor: not-allowed;
}

.account-field-note {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 12px;
}

.account-profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.account-profile-actions .btn {
    min-width: 170px;
    padding: 12px 24px;
    border-radius: 999px;
}

@media (max-width: 700px) {
    .account-section-heading,
    .account-orders-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .account-profile-card {
        padding: 22px;
    }

    .account-profile-actions .btn {
        width: 100%;
    }
}

.saved-checkout-details {
    padding: 26px;
    border: 1px solid var(--color-border-soft);
    border-radius: 20px;
    background: #faf7f4;
}

.saved-checkout-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-soft);
}

.saved-checkout-heading h2,
.checkout-edit-heading h2 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 25px;
}

.saved-checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding-top: 22px;
}

.saved-checkout-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.saved-checkout-grid strong {
    display: block;
    margin-bottom: 5px;
}

.saved-checkout-grid p {
    margin: 3px 0;
    color: var(--color-muted);
}

.checkout-edit-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.checkout-message-field {
    margin-top: 22px;
}

@media (max-width: 650px) {
    .saved-checkout-heading,
    .checkout-edit-heading {
        flex-direction: column;
    }

    .saved-checkout-grid {
        grid-template-columns: 1fr;
    }

    .saved-checkout-heading .btn {
        width: 100%;
    }
}

.use-saved-details-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.use-saved-details-button:hover {
    border-color: #222222;
    background: #222222;
    color: #ffffff;
    transform: translateY(-1px);
}

.use-saved-details-button span {
    font-size: 16px;
    line-height: 1;
}

.account-profile-summary {
    padding: 32px;
    border: 1px solid var(--color-border-soft);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 48px rgba(31, 31, 31, 0.06);
}

.account-profile-summary-header,
.account-profile-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border-soft);
}

.account-profile-summary-header h3,
.account-profile-form-header h3 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 27px;
}

.account-profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding-top: 26px;
}

.account-profile-summary-item {
    padding: 20px;
    border-radius: 16px;
    background: #faf7f4;
}

.account-profile-summary-item span {
    display: block;
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.account-profile-summary-item strong {
    display: block;
}

.account-profile-summary-item p {
    margin: 5px 0 0;
    color: var(--color-muted);
}

.account-profile-address {
    grid-column: 1 / -1;
}

.account-edit-profile-button {
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.account-profile-form-header {
    margin-bottom: 24px;
}

@media (max-width: 650px) {
    .account-profile-summary-header,
    .account-profile-form-header {
        flex-direction: column;
    }

    .account-profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .account-profile-address {
        grid-column: auto;
    }

    .account-edit-profile-button,
    .account-profile-form-header button {
        width: 100%;
    }
}

.otp-verification-card {
    max-width: 560px;
    margin: 70px auto;
    padding: 42px;
    border: 1px solid var(--color-border-soft);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 22px 60px rgba(31, 31, 31, 0.08);
    text-align: center;
}

.otp-verification-card h1 {
    margin: 8px 0 14px;
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 6vw, 52px);
}

.otp-verification-intro {
    margin: 0 auto 26px;
    max-width: 430px;
    color: var(--color-muted);
    line-height: 1.7;
}

.otp-verification-form {
    display: grid;
    gap: 18px;
}

.otp-verification-form .form-label {
    margin: 0;
    text-align: left;
}

.otp-boxes {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.otp-box {
    width: 64px;
    height: 72px;
    padding: 0;
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    background: #ffffff;
    color: var(--color-text);
    font-size: 32px;
    font-weight: 700;
    text-align: center;
}

.otp-box:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(138, 90, 68, 0.14);
}

@media (max-width: 480px) {
    .otp-boxes {
        gap: 9px;
    }

    .otp-box {
        width: 54px;
        height: 64px;
        font-size: 28px;
    }
}

.otp-verification-form .btn {
    padding: 13px 24px;
    border-radius: 999px;
}

.otp-resend-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 24px;
}

.otp-resend-section p,
.otp-resend-section form {
    margin: 0;
}

.otp-resend-button {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.otp-expiry-note {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 12px;
}

@media (max-width: 600px) {
    .otp-verification-card {
        margin: 40px auto;
        padding: 28px 22px;
    }

    .otp-input {
        font-size: 29px;
        letter-spacing: 13px;
    }

    .otp-resend-section {
        flex-direction: column;
    }
}

.product-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 46px;
}

.product-page-link {
    min-width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    background: #ffffff;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.product-page-link:hover,
.product-page-link.active {
    border-color: #222222;
    background: #222222;
    color: #ffffff;
}

.product-page-dots {
    padding: 0 5px;
    color: var(--color-muted);
}

html {
    background: var(--color-bg-start);
}

body {
    background:
        linear-gradient(
            180deg,
            var(--color-bg-start),
            var(--color-bg-middle)
        );
    color: var(--color-text);
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
label {
    color: var(--color-heading);
}

p,
small {
    color: var(--color-muted);
}

.navbar {
    background: var(--color-navbar);
    border-color: var(--color-border-soft);
}

nav a,
.navbar a,
.nav-link {
    color: var(--color-text);
}

footer {
    background: var(--color-footer);
    color: var(--color-footer-text);
}

footer p {
    color: var(--color-footer-text);
}

.product-card,
.dashboard-card,
.checkout-form-card,
.checkout-summary,
.confirmation-card,
.account-profile-card,
.account-profile-summary,
.account-order-card,
.account-orders-empty,
.sidebar-cart-summary,
.otp-verification-card,
.auth-card {
    background: var(--color-surface);
    border-color: var(--color-border-soft);
    box-shadow:
        0 18px 48px var(--color-shadow);
}

.product-card-body,
.account-profile-summary-item,
.account-order-address,
.account-order-message,
.saved-checkout-details {
    background: var(--color-surface-soft);
}

.product-image-placeholder {
    background:
        linear-gradient(
            135deg,
            var(--color-surface-muted),
            var(--color-hover-soft)
        );
}

.form-control,
.form-select {
    background-color: var(--color-input-bg);
    border-color: var(--color-border-soft);
    color: var(--color-text);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--color-input-bg);
    color: var(--color-text);
}

.form-control::placeholder,
textarea::placeholder {
    color: var(--color-muted);
    opacity: 0.75;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
.account-readonly-field {
    background-color: var(--color-disabled-bg);
    color: var(--color-muted);
}

.cart-offcanvas {
    background:
        linear-gradient(
            180deg,
            var(--color-surface),
            var(--color-bg-middle)
        );
    color: var(--color-text);
}

.offcanvas-header,
.sidebar-cart-item,
.checkout-summary-item,
.checkout-summary-row,
.account-order-details,
.account-order-item {
    border-color: var(--color-border-soft);
}

.sidebar-quantity-control {
    background: var(--color-surface);
    border-color: var(--color-border-soft);
}

.quantity-button {
    background: var(--color-hover-soft);
    color: var(--color-text);
}

.quantity-button:hover {
    background: var(--color-accent);
    color: #ffffff;
}

.account-order-toggle {
    color: var(--color-text);
}

.account-order-toggle:hover {
    background: var(--color-surface-soft);
}

.account-order-status,
.cart-count-badge {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.product-page-link,
.order-page-link {
    background: var(--color-surface);
    border-color: var(--color-border-soft);
    color: var(--color-text);
}

.product-page-link:hover,
.product-page-link.active,
.order-page-link:hover,
.order-page-link.active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-bg-start);
}

.use-saved-details-button,
.account-edit-profile-button {
    background: var(--color-surface);
    border-color: var(--color-border-soft);
    color: var(--color-text);
}

.use-saved-details-button:hover,
.account-edit-profile-button:hover {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-bg-start);
}

.otp-box {
    background: var(--color-input-bg);
    border-color: var(--color-border-soft);
    color: var(--color-text);
}

.alert-success {
    background: #183428;
    border-color: #27513e;
    color: #bce8cf;
}

.alert-danger {
    background: #3a2020;
    border-color: #633131;
    color: #f4c1c1;
}

.alert-warning {
    background: #3a301b;
    border-color: #665329;
    color: #f4dda4;
}

html[data-theme="light"] .alert-success {
    background: #d9eee4;
    border-color: #9bcbb2;
    color: #174c31;
}

html[data-theme="light"] .alert-danger {
    background: #f7dddd;
    border-color: #e8aaaa;
    color: #7b1f1f;
}

html[data-theme="light"] .alert-warning {
    background: #fff0c9;
    border-color: #e4ca86;
    color: #684f13;
}

.theme-toggle-button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--color-border-soft);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 19px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.theme-toggle-button:hover {
    border-color: var(--color-accent);
    background: var(--color-hover-soft);
    transform: translateY(-1px);
}

html[data-theme="dark"] img {
    opacity: 0.94;
}

/* Dark-mode corrections */

html[data-theme="dark"] .navbar .btn-dark,
html[data-theme="dark"] .btn-dark {
    background-color: #f3efec;
    border-color: #f3efec;
    color: #181818;
}

html[data-theme="dark"] .navbar .btn-dark:hover,
html[data-theme="dark"] .btn-dark:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #121212;
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .cart-item,
html[data-theme="dark"] .cart-summary,
html[data-theme="dark"] .checkout-form-card,
html[data-theme="dark"] .checkout-summary,
html[data-theme="dark"] .confirmation-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .admin-section,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .account-profile-card,
html[data-theme="dark"] .account-profile-summary,
html[data-theme="dark"] .account-order-card,
html[data-theme="dark"] .account-orders-empty,
html[data-theme="dark"] .sidebar-cart-summary,
html[data-theme="dark"] .otp-verification-card {
    background: var(--color-surface);
}

html[data-theme="dark"] .product-card-body,
html[data-theme="dark"] .account-profile-summary-item,
html[data-theme="dark"] .account-order-address,
html[data-theme="dark"] .account-order-message,
html[data-theme="dark"] .saved-checkout-details {
    background: var(--color-surface-soft);
}

html[data-theme="dark"] .product-image-placeholder,
html[data-theme="dark"] .product-detail-image,
html[data-theme="dark"] .product-carousel-media {
    background: linear-gradient(
        135deg,
        var(--color-surface-muted),
        var(--color-hover-soft)
    );
}

html[data-theme="dark"] .use-saved-details-button,
html[data-theme="dark"] .account-edit-profile-button {
    background: var(--color-surface);
    color: var(--color-text);
}

html[data-theme="dark"] .account-order-toggle:hover {
    background: var(--color-surface-soft);
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.product-card-actions,
.product-card-actions form,
.product-card-cart-button {
    position: relative;
    z-index: 2;
}

.product-card {
    position: relative;
}

.product-card-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.product-card-actions {
    position: relative;
    z-index: 2;
}

.product-card-actions form,
.product-card-action-link {
    position: relative;
    z-index: 3;
}

/* Navbar action buttons */

html[data-theme="light"] .navbar .btn-dark {
    background-color: #222222;
    border-color: #222222;
    color: #ffffff;
}

html[data-theme="light"] .navbar .btn-dark:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

html[data-theme="dark"] .navbar .btn-dark {
    background-color: #f3efec;
    border-color: #f3efec;
    color: #181818;
}

html[data-theme="dark"] .navbar .btn-dark:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #121212;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    background: var(--color-surface-soft);
}

.product-card-footer {
    margin-top: auto;
}

.product-pagination,
.order-pagination {
    background: transparent;
}

/* Admin table theme */

.admin-table-wrapper .table {
    --bs-table-bg: var(--color-surface);
    --bs-table-color: var(--color-text);
    --bs-table-border-color: var(--color-border-soft);
    --bs-table-hover-bg: var(--color-surface-soft);
    --bs-table-hover-color: var(--color-text);

    margin-bottom: 0;
}

.admin-table-wrapper .table thead th {
    background: var(--color-surface-soft);
    color: var(--color-muted);
    border-color: var(--color-border-soft);
}

.admin-table-wrapper .table tbody td {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-soft);
}

.admin-table-wrapper .btn-outline-dark {
    border-color: var(--color-text);
    color: var(--color-text);
}

.admin-table-wrapper .btn-outline-dark:hover {
    background: var(--color-text);
    color: var(--color-bg-start);
}

/* Admin product pagination */

.admin-product-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 28px;
    background: transparent;
}

.admin-page-link {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0 11px;
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.admin-page-link:hover,
.admin-page-link.active {
    border-color: var(--color-text);
    background: var(--color-text);
    color: var(--color-bg-start);
}

.admin-page-dots {
    padding: 0 4px;
    color: var(--color-muted);
}

/* Bootstrap modal dark-mode fixes */

.modal-content {
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border-soft);
}

.modal-header,
.modal-footer {
    border-color: var(--color-border-soft);
}

.modal-title,
.modal-body,
.modal-body p,
.modal-body label {
    color: var(--color-text);
}

.modal .text-muted {
    color: var(--color-muted) !important;
}

.modal .form-control,
.modal .form-select {
    background-color: var(--color-input-bg);
    border-color: var(--color-border-soft);
    color: var(--color-text);
}

.modal .form-control:focus,
.modal .form-select:focus {
    background-color: var(--color-input-bg);
    color: var(--color-text);
}

.modal .form-control::file-selector-button {
    background-color: var(--color-surface-soft);
    color: var(--color-text);
    border-color: var(--color-border-soft);
}

.modal .btn-outline-dark {
    border-color: var(--color-text);
    color: var(--color-text);
}

.modal .btn-outline-dark:hover {
    background-color: var(--color-text);
    color: var(--color-bg-start);
}

html[data-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-theme="dark"] .modal .btn-dark {
    background-color: #f3efec;
    border-color: #f3efec;
    color: #181818;
}

html[data-theme="dark"] .modal .btn-dark:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #121212;
}

.admin-section-count {
    margin: 0;
    color: var(--color-muted);
}

.admin-orders-list {
    display: grid;
    gap: 16px;
}

.admin-order-card {
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: var(--color-surface);
}

.admin-order-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px 22px;
    border: none;
    background: transparent;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.admin-order-toggle:hover {
    background: var(--color-surface-soft);
}

.admin-order-toggle > div:first-child {
    display: grid;
    gap: 4px;
}

.admin-order-reference {
    font-family: "Playfair Display", serif;
    font-size: 20px;
}

.admin-order-customer {
    color: var(--color-text);
    font-weight: 600;
}

.admin-order-toggle small {
    color: var(--color-muted);
}

.admin-order-summary {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-order-details {
    padding: 24px;
    border-top: 1px solid var(--color-border-soft);
}

.admin-order-customer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-order-customer-grid > div,
.admin-order-address,
.admin-order-message {
    padding: 18px;
    border-radius: 14px;
    background: var(--color-surface-soft);
}

.admin-order-customer-grid span,
.admin-order-address > span,
.admin-order-message > span {
    display: block;
    margin-bottom: 7px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-order-customer-grid a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}

.admin-order-address,
.admin-order-message {
    margin-top: 16px;
}

.admin-order-address p,
.admin-order-message p {
    margin: 0;
    line-height: 1.7;
}

.admin-order-items {
    margin-top: 24px;
}

.admin-order-items h3 {
    margin-bottom: 10px;
    font-family: "Playfair Display", serif;
    font-size: 22px;
}

.admin-order-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.admin-order-item small {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
}

.admin-order-totals {
    max-width: 340px;
    margin: 22px 0 0 auto;
}

.admin-order-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0;
}

.admin-order-total {
    margin-top: 8px;
    padding-top: 16px !important;
    border-top: 1px solid var(--color-border-soft);
    font-size: 18px;
}

.admin-order-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.admin-order-actions .btn {
    border-radius: 999px;
    padding: 10px 22px;
}

@media (max-width: 700px) {
    .admin-order-toggle {
        align-items: flex-start;
        padding: 18px;
    }

    .admin-order-summary {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-order-customer-grid {
        grid-template-columns: 1fr;
    }

    .admin-order-item {
        flex-direction: column;
    }

    .admin-order-totals {
        max-width: none;
    }

    .admin-order-actions .btn {
        width: 100%;
    }
}

/* Compact admin order rows - override only */

.admin-orders-list {
    display: block;
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    background: var(--color-surface);
}

.admin-order-card {
    border: none;
    border-bottom: 1px solid var(--color-border-soft);
    border-radius: 0;
    background: transparent;
}

.admin-order-card:last-child {
    border-bottom: none;
}

.admin-order-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 11px 16px;
}

.admin-order-toggle > div:first-child {
    display: grid;
    grid-template-columns: 105px minmax(150px, 1fr) 190px;
    align-items: center;
    gap: 14px;
}

.admin-order-reference {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
}

.admin-order-customer {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-order-toggle small {
    font-size: 12px;
}

.admin-order-summary {
    display: grid;
    grid-template-columns: 82px 58px 24px;
    align-items: center;
    gap: 10px;
}

.admin-order-summary > strong {
    font-size: 13px;
    text-align: right;
}

.admin-order-summary .account-order-status {
    padding: 5px 8px;
    font-size: 10px;
    text-align: center;
}

.admin-order-summary .collapse-symbol {
    width: 24px;
    height: 24px;
    font-size: 14px;
}

.admin-order-toggle.collapsed .collapse-symbol::before {
    content: "+";
}

.admin-order-toggle:not(.collapsed) .collapse-symbol::before {
    content: "−";
}

.admin-order-details {
    padding: 20px;
    background: var(--color-surface-soft);
}

@media (max-width: 800px) {
    .admin-order-toggle > div:first-child {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .admin-order-summary {
        grid-template-columns: auto auto 24px;
    }
}

@media (max-width: 560px) {
    .admin-order-toggle {
        grid-template-columns: 1fr;
    }

    .admin-order-summary {
        justify-content: start;
        text-align: left;
    }

    .admin-order-summary > strong {
        text-align: left;
    }
}

/* Compact expanded admin order details */

.admin-order-details {
    padding: 16px 18px;
    background: var(--color-surface-soft);
}

.admin-order-customer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-order-customer-grid > div,
.admin-order-address,
.admin-order-message {
    padding: 12px 14px;
    border-radius: 10px;
}

.admin-order-customer-grid span,
.admin-order-address > span,
.admin-order-message > span {
    margin-bottom: 4px;
    font-size: 9px;
    letter-spacing: 0.8px;
}

.admin-order-customer-grid strong,
.admin-order-customer-grid a,
.admin-order-address p,
.admin-order-message p {
    font-size: 12px;
    line-height: 1.4;
}

.admin-order-address,
.admin-order-message {
    margin-top: 10px;
}

.admin-order-items {
    margin-top: 14px;
}

.admin-order-items h3 {
    margin-bottom: 4px;
    font-size: 18px;
}

.admin-order-item {
    padding: 9px 0;
}

.admin-order-item strong {
    font-size: 12px;
}

.admin-order-item small {
    margin-top: 2px;
    font-size: 11px;
}

.admin-order-totals {
    max-width: 280px;
    margin-top: 12px;
}

.admin-order-totals > div {
    padding: 5px 0;
    font-size: 12px;
}

.admin-order-total {
    margin-top: 4px;
    padding-top: 9px !important;
    font-size: 14px;
}

.admin-order-actions {
    display: none;
}

@media (max-width: 900px) {
    .admin-order-customer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .admin-order-customer-grid {
        grid-template-columns: 1fr;
    }
}