:root {
    --market-blue: #8d2f54;
    --market-blue-dark: #742545;
    --market-bg: #f6eff2;
    --market-white: #fffdfd;
    --market-text: #2d2026;
    --market-text-light: #7b6871;
    --market-border: rgba(141, 47, 84, 0.12);
    --font-main: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Cormorant Garamond", serif;
    --shadow-soft: 0 18px 45px rgba(58, 28, 40, 0.08);
    --shadow-strong: 0 24px 60px rgba(58, 28, 40, 0.12);
    --radius-soft: 18px;
    --radius-lg: 28px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background:
            radial-gradient(circle at top right, rgba(141, 47, 84, 0.05), transparent 28%),
            linear-gradient(180deg, #f8f2f4 0%, #f4edef 100%);
    font-family: var(--font-main);
    color: var(--market-text);
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

.max-width-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* --- HEADER --- */
.market-header {
    background: rgba(255, 253, 253, 0.92);
    border-bottom: 1px solid var(--market-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(58, 28, 40, 0.04);
}

.market-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1.25rem;
}

.header-left {
    flex-shrink: 0;
}

.market-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--market-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

.logo-accent {
    color: var(--market-blue);
    font-size: 2rem;
    margin-right: 2px;
}

.header-center {
    flex: 1;
    min-width: 0;
    max-width: 860px;
}

.market-search-area {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
}

@media (min-width: 769px) {
    .market-search-area {
        display: block;
        width: 100%;
    }

    .market-search-bar {
        width: 100%;
    }
}

.market-search-bar {
    display: grid;
    grid-template-columns: 1fr 56px;
    align-items: stretch;
    border: 1px solid var(--market-border);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    min-height: 54px;
    width: 100%;
}

.categories-dropdown {
    display: none;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--market-border);
    padding: 0 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--market-text);
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border-radius: 999px;
    min-height: 52px;
    box-shadow: var(--shadow-soft);
}

.categories-dropdown:hover,
.categories-dropdown.active {
    background: #fff;
    color: var(--market-blue);
    border-color: rgba(141, 47, 84, 0.22);
}

#shop-search {
    min-width: 0;
    width: 100%;
    border: none;
    padding: 0 1rem;
    font-size: 0.98rem;
    background: transparent;
    color: var(--market-text);
}

#shop-search::placeholder {
    color: #a08d96;
}

#shop-search:focus {
    outline: none;
}

.search-submit-btn {
    border: none;
    background: var(--market-blue);
    color: #fff;
    cursor: pointer;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.search-submit-btn:hover {
    background: var(--market-blue-dark);
}

.search-icon-svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.cart-trigger-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.78rem 1.15rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--market-border);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 54px;
    box-shadow: var(--shadow-soft);
}

.cart-trigger-wrapper:hover {
    background: #fff;
    border-color: rgba(141, 47, 84, 0.24);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(141, 47, 84, 0.12);
}

.cart-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon-container i {
    font-size: 1.2rem;
    color: var(--market-blue);
}

.cart-badge-new {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #c94b67;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}

.action-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--market-blue);
}

.market-nav {
    display: none !important;
}

/* --- MAIN LAYOUT --- */
.market-main {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 5rem;
    min-height: 800px;
    transition: opacity 0.3s ease;
}

.market-main.loading {
    opacity: 0.7;
    pointer-events: none;
}

.market-sidebar {
    background: rgba(255, 253, 253, 0.72);
    border: 1px solid var(--market-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    height: fit-content;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--market-blue);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.filter-list a {
    display: block;
    text-decoration: none;
    color: var(--market-text-light);
    font-size: 0.96rem;
    margin-bottom: 0.9rem;
    transition: 0.2s ease;
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--market-blue);
    transform: translateX(3px);
}

.market-content {
    min-width: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--market-border);
}

.results-header h2 {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--market-blue);
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-controls ul,
.results-controls li {
    display: none !important;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 220px;
}

#shop-sort {
    display: none;
}

.custom-select-trigger {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--market-border);
    padding: 0.8rem 1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
    min-height: 46px;
    box-shadow: var(--shadow-soft);
}

.custom-select-trigger:hover {
    border-color: rgba(141, 47, 84, 0.22);
}

.custom-select-trigger::after {
    content: "\f0d7";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: #9e8892;
}

.custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--market-border);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(58, 28, 40, 0.12);
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-option {
    padding: 0.8rem 1.1rem;
    font-size: 0.92rem;
    cursor: pointer;
    transition: 0.2s;
    color: var(--market-text);
}

.custom-option:hover {
    background: #fbf5f7;
    color: var(--market-blue);
}

.custom-option.selected {
    background: #f5e7ec;
    color: var(--market-blue);
    font-weight: 700;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--market-text-light);
}

.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.product-card-modern {
    background: linear-gradient(180deg, #fcf9fa 0%, #f8f3f5 100%);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    transition: all 0.3s ease;
    border: 1px solid var(--market-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-soft);
}

.product-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.product-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background:
            radial-gradient(circle at top left, rgba(141, 47, 84, 0.05), transparent 30%),
            linear-gradient(180deg, #fffefe 0%, #f9f4f6 100%);
}

.product-image-wrapper a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-img {
    max-width: 80%;
    max-height: 86%;
    object-fit: contain;
}

.product-details {
    padding: 0;
    text-align: center;
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--market-blue);
    margin-bottom: 0.35rem;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
    line-height: 1.02;
}

.product-name:hover {
    color: var(--market-blue-dark);
}

.product-price-modern {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--market-text);
}

.original-price-strike {
    text-decoration: line-through;
    color: #a39199;
    font-size: 0.9rem;
    font-weight: 400;
    margin-right: 0.5rem;
}

.product-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.btn-card-primary,
.btn-card-secondary {
    flex: 1;
    padding: 0.9rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s ease;
    border: none;
}

.btn-card-primary {
    background: var(--market-blue);
    color: #fff;
}

.btn-card-primary:hover {
    background: var(--market-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(141, 47, 84, 0.18);
}

.btn-card-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--market-blue);
    border: 1px solid var(--market-border);
}

.btn-card-secondary:hover {
    background: #fff;
    border-color: rgba(141, 47, 84, 0.22);
    color: var(--market-blue-dark);
}

.market-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: flex-end;
}

.pagination-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-link {
    border: 1px solid var(--market-border);
    background: #fff;
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    color: var(--market-text);
    min-width: 42px;
    text-align: center;
}

.page-link:hover {
    border-color: var(--market-blue);
    color: var(--market-blue);
}

.page-link.active {
    background: var(--market-blue);
    color: #fff;
    border-color: var(--market-blue);
}

/* DETAIL */
.market-main-detail {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.product-detail-market-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: rgba(255, 253, 253, 0.86);
    padding: 3rem;
    border: 1px solid var(--market-border);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
}

.product-detail-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.main-image-container {
    background:
            radial-gradient(circle at top left, rgba(141, 47, 84, 0.05), transparent 30%),
            linear-gradient(180deg, #fffefe 0%, #f9f4f6 100%);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    overflow: hidden;
}

.main-image-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.detail-thumb-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.detail-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid var(--market-border);
    padding: 5px;
    cursor: pointer;
    background: #fff;
    object-fit: contain;
    transition: 0.2s;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    flex-shrink: 0;
}

.detail-thumb:hover {
    border-color: var(--market-blue);
}

.detail-back-row {
    margin-bottom: 1rem;
}

.detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--market-text);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--market-border);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.detail-back-btn:hover {
    color: var(--market-blue);
    border-color: var(--market-blue);
    background: #fff;
}

.detail-back-arrow {
    font-size: 1rem;
    line-height: 1;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--market-text-light);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--market-blue);
}

.detail-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--market-blue);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.detail-old-price {
    font-size: 1.4rem;
    color: #b4a5ac;
    text-decoration: line-through;
}

.detail-current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--market-blue);
}

.detail-description {
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.short-desc {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--market-text);
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--market-blue);
}

.long-desc {
    font-size: 1rem;
    color: var(--market-text-light);
}

.detail-meta-box {
    background: rgba(255, 255, 255, 0.72);
    padding: 1.5rem;
    border-radius: 18px;
    margin-bottom: 2.5rem;
    border: 1px solid var(--market-border);
}

.detail-meta-box p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.status-in-stock {
    color: #4f8a5b;
    font-weight: 700;
}

.status-out-stock {
    color: #c05062;
    font-weight: 700;
}

.detail-actions {
    display: flex;
    gap: 1rem;
}

.btn-market-primary {
    background: var(--market-blue);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-weight: 800;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    flex: 1;
}

.btn-market-primary:hover {
    background: var(--market-blue-dark);
    box-shadow: 0 5px 15px rgba(141, 47, 84, 0.24);
}

.btn-market-outline {
    background: transparent;
    color: var(--market-blue);
    border: 1px solid var(--market-blue);
    padding: 1rem 2rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-market-outline:hover {
    background: #fbf5f7;
    color: var(--market-blue-dark);
    border-color: var(--market-blue-dark);
}

.btn-market-disabled {
    background: #ece5e8;
    color: #b1a3aa;
    border: none;
    padding: 1rem 2rem;
    font-weight: 800;
    border-radius: 999px;
    cursor: not-allowed;
    flex: 1;
}

.btn-market-wishlist {
    background: #fff;
    border: 1px solid var(--market-border);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.2rem;
    color: #b29ea7;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-market-wishlist:hover {
    color: #c94b67;
    border-color: #c94b67;
}

.snackbar-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 350px;
    max-width: 90vw;
}

.cyber-snackbar {
    background: #3d2a31;
    color: #fff;
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(58, 28, 40, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--market-blue);
}

.cyber-snackbar.active {
    opacity: 1;
    transform: translateY(0);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 28, 36, 0.42);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: min(1120px, 100%);
    max-height: calc(100vh - 2rem);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(58, 28, 40, 0.22);
    transform: translateY(20px);
    transition: 0.35s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-premium {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f8f1f4;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.modal-close-premium:hover {
    background: #f2e5ea;
    color: #c94b67;
}

.modal-inner-grid {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    height: 100%;
    max-height: calc(100vh - 2rem);
}

.modal-sidebar-cart {
    background: #fdf9fa;
    border-right: 1px solid var(--market-border);
    padding: 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-main-form {
    padding: 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-header-premium h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--market-blue);
    padding-right: 2rem;
}

.cart-item-modern {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1e7eb;
    position: relative;
}

.cart-item-thumb img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--market-border);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 0.7rem;
    color: var(--market-text);
    word-break: break-word;
}

.cart-item-controls-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quantity-controls-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8f1f4;
    border: 1px solid #eadce2;
    padding: 4px 10px;
    border-radius: 999px;
}

.qty-btn-modern {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 800;
    color: var(--market-blue);
    font-size: 1rem;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-btn-modern.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.qty-val-modern {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--market-text);
    min-width: 16px;
    text-align: center;
}

.cart-item-price-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--market-text-light);
    font-size: 0.92rem;
    white-space: nowrap;
}

.remove-item-btn {
    background: #fff;
    border: 1px solid #eadce2;
    color: #b5a2aa;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background: #fff5f7;
    border-color: #efb6c3;
    color: #c94b67;
}

.cart-total-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--market-border);
}

.checkout-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #9c8790;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.form-group-premium {
    margin-bottom: 1.2rem;
}

.form-group-premium label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--market-text);
}

.form-group-premium input {
    width: 100%;
    min-width: 0;
    padding: 0.95rem 1rem;
    border: 1px solid var(--market-border);
    border-radius: 14px;
    font-size: 1rem;
    transition: 0.2s;
    background: rgba(255, 255, 255, 0.88);
}

.form-group-premium input:focus {
    border-color: var(--market-blue);
    box-shadow: 0 0 0 4px rgba(141, 47, 84, 0.1);
    outline: none;
}

.form-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.grand-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--market-border);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--market-blue);
}

.post-add-modal {
    max-width: 450px;
    padding: 3rem;
    text-align: center;
}

.post-add-icon {
    width: 70px;
    height: 70px;
    background: #4f8a5b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.post-add-title {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--market-text);
}

.post-add-subtitle {
    color: var(--market-text-light);
    margin-bottom: 2rem;
}

.post-add-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(44, 28, 36, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1900;
}

.mobile-sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.market-footer {
    background: #fdf9fa;
    border-top: 1px solid var(--market-border);
    padding: 5rem 0 0;
    margin-top: 4rem;
    color: var(--market-text);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    padding-bottom: 4rem;
}

.footer-col.branding .footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--market-blue);
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--market-text-light);
    margin-bottom: 2rem;
    max-width: 300px;
}

.social-icons {
    display: flex;
    gap: 1.25rem;
}

.social-icons a {
    width: 38px;
    height: 38px;
    background: #f5e9ee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--market-blue);
    text-decoration: none;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--market-blue);
    color: #fff;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--market-blue);
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.85rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--market-text-light);
    font-size: 0.95rem;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--market-blue);
    padding-left: 5px;
}

.contact-col p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--market-text-light);
}

.contact-col i {
    color: var(--market-blue);
    width: 15px;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.payment-methods img {
    height: 22px;
    filter: grayscale(1);
    opacity: 0.6;
    transition: 0.3s;
}

.payment-methods img:hover {
    filter: grayscale(0);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--market-border);
    padding: 1.5rem 0;
    background: #fff;
    font-size: 0.85rem;
    color: #b4a5ac;
}

.footer-bottom p {
    text-align: center;
}

.footer-bottom a {
    color: #b4a5ac;
    text-decoration: none;
    margin-left: 10px;
}

.market-hero {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.hero-content-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 32px;
    overflow: hidden;
    background:
            radial-gradient(circle at top right, rgba(141, 47, 84, 0.10), transparent 28%),
            linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.58));
    border: 1px solid var(--market-border);
    box-shadow: var(--shadow-soft);
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    transition: transform 0.6s ease;
}

.hero-content-wrapper:hover .hero-bg-img {
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 250, 252, 0.92) 0%, rgba(255, 250, 252, 0.55) 52%, transparent 100%);
    display: flex;
    align-items: center;
    padding: 0 4rem;
}

.hero-text-box {
    max-width: 560px;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.42);
    /*padding: 2.2rem;*/
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.52);
}

.hero-badge {
    display: inline-block;
    background: var(--market-blue);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 3.5vw, 3.8rem);
    font-weight: 700;
    color: var(--market-blue);
    line-height: 0.95;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: var(--market-text-light);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--market-blue);
    color: #fff;
    padding: 0.95rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 8px 22px rgba(141, 47, 84, 0.2);
}

.btn-hero-primary:hover {
    background: var(--market-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(141, 47, 84, 0.25);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.72);
    color: var(--market-blue);
    padding: 0.95rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid var(--market-border);
}

.btn-hero-secondary:hover {
    background: #fff;
    border-color: rgba(141, 47, 84, 0.22);
}

/* Responsive */
@media (max-width: 1100px) {
    .market-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .market-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: min(86vw, 320px);
        background: #fff;
        z-index: 2000;
        box-shadow: 10px 0 30px rgba(58, 28, 40, 0.12);
        padding: 1.5rem;
        transition: left 0.3s ease;
        display: block;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 0 28px 28px 0;
    }

    .market-sidebar.mobile-open {
        left: 0;
    }

    .products-grid-modern {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-market-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .modal-inner-grid {
        grid-template-columns: 1fr;
    }

    .modal-sidebar-cart {
        border-right: none;
        border-bottom: 1px solid var(--market-border);
        max-height: 42vh;
    }

    .modal-main-form {
        max-height: calc(100vh - 42vh - 2rem);
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content-wrapper {
        height: 420px;
    }

    .hero-overlay {
        padding: 0 2rem;
        background: rgba(255, 250, 252, 0.76);
    }

    .hero-title {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        max-width: 100%;
    }

    .max-width-container {
        padding: 0 1.25rem;
    }

    .market-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
        padding: 1rem 0;
    }

    .header-left {
        display: flex;
        justify-content: center;
    }

    .market-logo {
        justify-content: center;
    }

    .header-center {
        width: 100%;
        max-width: 100%;
    }

    .market-search-area {
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
        width: 100%;
    }

    .market-search-area,
    .header-right {
        padding-left: 0.15rem;
        padding-right: 0.15rem;
    }

    .categories-dropdown,
    .cart-trigger-wrapper,
    .market-search-bar {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset;
    }

    .market-search-bar {
        display: grid;
        grid-template-columns: 1fr 52px;
        min-height: 50px;
        border-radius: 999px;
        width: 100%;
    }

    .categories-dropdown {
        display: inline-flex;
        width: 100%;
        min-height: 46px;
        padding: 0 1rem;
        justify-content: center;
        align-items: center;
        gap: 0.55rem;
        font-size: 0.92rem;
        border: 1px solid var(--market-border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.86);
    }

    .categories-dropdown i {
        font-size: 1rem;
        margin: 0;
    }

    .categories-dropdown span {
        display: inline;
    }

    #shop-search {
        padding: 0 0.85rem;
        font-size: 0.95rem;
    }

    .search-submit-btn {
        font-size: 1rem;
    }

    .header-right {
        width: 100%;
    }

    .cart-trigger-wrapper {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
        min-height: 48px;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .results-controls {
        width: 100%;
    }

    .sort-wrapper {
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .custom-select-wrapper {
        width: 100%;
    }

    .custom-select-trigger {
        width: 100%;
    }

    .hero-content-wrapper {
        height: auto;
        min-height: 0;
    }

    .hero-bg-img {
        display: none;
    }

    .hero-overlay {
        position: relative;
        padding: 1.5rem;
        background: #f7eef1;
    }

    .hero-text-box {
        max-width: 100%;
        width: 100%;
        padding: 0;
        background: transparent;
        backdrop-filter: none;
        border: none;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        text-align: center;
    }

    .products-grid-modern {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .product-card-modern {
        padding: 1rem;
    }

    .product-card-actions {
        flex-direction: column;
    }

    .market-pagination {
        justify-content: center;
    }

    .market-main-detail {
        padding-top: 1.5rem;
    }

    .detail-back-row {
        margin-bottom: 0.85rem;
    }

    .detail-back-btn {
        width: 100%;
        justify-content: center;
    }

    .detail-title {
        font-size: 2.2rem;
    }

    .detail-current-price {
        font-size: 1.9rem;
    }

    .detail-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-market-primary.add-to-cart-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 18px 18px 0 0;
    }

    .modal-inner-grid {
        grid-template-columns: 1fr;
        max-height: 100dvh;
        height: 100%;
    }

    .modal-sidebar-cart {
        max-height: 36vh;
        padding: 1.1rem;
    }

    .modal-main-form {
        padding: 1.1rem;
        max-height: none;
    }

    .modal-header-premium h2 {
        font-size: 1.6rem;
        margin-bottom: 1.1rem;
    }

    .cart-item-modern {
        gap: 0.75rem;
    }

    .cart-item-thumb img {
        width: 58px;
        height: 58px;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart-item-controls-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-group-premium {
        margin-bottom: 1rem;
    }

    .form-group-premium input {
        padding: 0.9rem 0.9rem;
        font-size: 0.98rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        padding: 0;
        list-style: none;
    }

    .footer-logo {
        justify-content: center;
    }

    .social-icons,
    .payment-methods,
    .contact-col p {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .contact-col p {
        flex-wrap: wrap;
    }

    .footer-bottom a {
        display: inline-block;
        margin-left: 6px;
    }
}

@media (max-width: 600px) {
    .products-grid-modern {
        grid-template-columns: 1fr;
    }

    .product-image-wrapper {
        aspect-ratio: 1 / 1;
    }

    .results-header h2 {
        font-size: 1.8rem;
    }

    .sort-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-wrapper span {
        font-size: 0.88rem;
    }

    .post-add-modal {
        max-width: 100%;
        padding: 2rem 1.25rem;
        border-radius: 18px 18px 0 0;
    }
}

@media (max-width: 480px) {
    .max-width-container {
        padding: 0 1rem;
    }

    .market-header-top {
        padding: 0.9rem 0;
    }

    .market-logo {
        font-size: 1.7rem;
    }

    .logo-accent {
        font-size: 1.7rem;
    }

    .market-search-bar {
        grid-template-columns: 1fr 48px;
        min-height: 48px;
    }

    #shop-search {
        font-size: 0.92rem;
        padding: 0 0.75rem;
    }

    .cart-trigger-wrapper {
        padding: 0.75rem 0.9rem;
    }

    .action-label {
        font-size: 0.9rem;
    }

    .hero-overlay {
        padding: 1.1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-badge {
        margin-bottom: 1rem;
    }

    .product-card-modern {
        padding: 0.95rem;
    }

    .btn-card-primary,
    .btn-card-secondary {
        padding: 0.78rem 0.55rem;
        font-size: 0.85rem;
    }

    .detail-title {
        font-size: 1.9rem;
    }

    .detail-current-price {
        font-size: 1.7rem;
    }

    .modal-close-premium {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }

    .modal-sidebar-cart {
        max-height: 34vh;
        padding: 1rem;
    }

    .modal-main-form {
        padding: 1rem;
    }

    .checkout-section-title {
        font-size: 0.74rem;
    }

    .snackbar-container {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }

    .cyber-snackbar {
        font-size: 0.86rem;
        padding: 0.9rem 1rem;
    }
}