/* ==========================================================================
   AlgoCosme - B2B Wholesale EC Site
   Main Stylesheet - Apple-inspired Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Variables
   -------------------------------------------------------------------------- */
:root {
    /* Primary colors */
    --primary: #1A5276;
    --primary-light: #2E86C1;
    --primary-dark: #154360;
    --gold: #C9A84C;
    --gold-light: #D4B860;
    --gold-dark: #B8973F;

    /* Category accent colors */
    --peeling: #2E86C1;
    --lotion: #1ABC9C;
    --cream: #8E44AD;
    --face-wash: #E67E22;

    /* Category accent backgrounds */
    --peeling-bg: #EBF5FB;
    --lotion-bg: #E8F8F5;
    --cream-bg: #F4ECF7;
    --face-wash-bg: #FDF2E9;

    /* Neutrals */
    --white: #FFFFFF;
    --bg: #F8F9FA;
    --bg-secondary: #F0F2F5;
    --text-primary: #2C3E50;
    --text-secondary: #6C757D;
    --text-light: #95A5A6;
    --border: #E8ECF0;
    --border-light: #F0F2F5;

    /* Status colors */
    --success: #27AE60;
    --error: #E74C3C;
    --info: #3498DB;
    --warning: #F39C12;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    --font-english: 'Cormorant Garamond', serif;

    /* Spacing (Fibonacci) */
    --space-xs: 8px;
    --space-sm: 13px;
    --space-md: 21px;
    --space-lg: 34px;
    --space-xl: 55px;
    --space-2xl: 89px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;

    /* Container */
    --container-max: 1200px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

h1 {
    font-size: 2rem;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 1.625rem;
    letter-spacing: 0.02em;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

p {
    margin-bottom: var(--space-sm);
}

.text-english {
    font-family: var(--font-english);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.text-serif {
    font-family: var(--font-serif);
}

small, .text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-muted {
    color: var(--text-secondary);
}

.text-light {
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   4. Container
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-xs {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.site-logo a {
    font-family: var(--font-english);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.site-logo a:hover {
    color: var(--primary-dark);
}

.site-logo .logo-sub {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    display: block;
    margin-top: -4px;
}

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    padding: var(--space-xs) 0;
    position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: var(--space-lg);
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   7. Hero Section
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url("/assets/images/hero.jpg") center/cover no-repeat;
    color: var(--white);
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(201, 168, 76, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-english);
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
    color: var(--white);
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-lg);
}

.hero-description {
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.hero-divider {
    width: 55px;
    height: 1px;
    background: var(--gold);
    margin: var(--space-md) auto;
    opacity: 0.7;
}

.hero-cta {
    display: inline-block;
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    background: var(--gold);
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.hero-cta:hover {
    background: var(--gold-dark);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   7b. Founding Story
   -------------------------------------------------------------------------- */
.founding-story {
    background: #FDF6F0;
    padding: 80px 0;
}

.founding-story-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.founding-story-title {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: #2C2C2C;
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.founding-story-line {
    width: 60px;
    height: 3px;
    background: #E8A0B4;
    margin: 0 auto var(--space-xl);
}

.founding-story-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.founding-story-content p {
    font-size: 1.05rem;
    line-height: 2.0;
    color: #4A4A4A;
    margin-bottom: 1.8rem;
}

.founding-story-content p:last-child {
    margin-bottom: 0;
}

.founding-story-emphasis {
    font-weight: 500;
}

@media (max-width: 768px) {
    .founding-story {
        padding: 48px 0;
    }

    .founding-story-title {
        font-size: 1.4rem;
    }

    .founding-story-content p {
        font-size: 0.95rem;
    }
}

/* --------------------------------------------------------------------------
   8. Category Section
   -------------------------------------------------------------------------- */
.section {
    padding: var(--space-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.625rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    padding-bottom: var(--space-xs);
}

.section-title-en {
    font-family: var(--font-english);
    font-size: 0.875rem;
    color: var(--text-light);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.category-accent {
    width: 4px;
    height: 28px;
    border-radius: 2px;
}

.category-accent--peeling { background: var(--peeling); }
.category-accent--lotion { background: var(--lotion); }
.category-accent--cream { background: var(--cream); }
.category-accent--face-wash { background: var(--face-wash); }

.category-title {
    font-size: 1.25rem;
}

.category-title-en {
    font-family: var(--font-english);
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-left: var(--space-xs);
}

/* --- Category Sections --- */
.category-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-xl) 0;
}

.section-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
    text-align: center;
}

.section-divider {
    width: 34px;
    height: 2px;
    margin: var(--space-sm) auto 0;
    border-radius: 1px;
}

.section-more {
    text-align: center;
    margin-top: var(--space-lg);
}

.more-link {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 0.875rem;
    color: var(--primary);
    letter-spacing: 0.05em;
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.more-link:hover {
    background: var(--primary);
    color: var(--white);
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-section-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Product Grid
   -------------------------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* --------------------------------------------------------------------------
   10. Product Card
   -------------------------------------------------------------------------- */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 3px solid var(--border);
}

a.product-card,
.product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card .card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.product-card[data-category="peeling"] { border-top-color: var(--peeling); }
.product-card[data-category="lotion"] { border-top-color: var(--lotion); }
.product-card[data-category="cream"] { border-top-color: var(--cream); }
.product-card[data-category="face-wash"] { border-top-color: var(--face-wash); }

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-card--peeling { border-top-color: var(--peeling); }
.product-card--lotion { border-top-color: var(--lotion); }
.product-card--cream { border-top-color: var(--cream); }
.product-card--face-wash { border-top-color: var(--face-wash); }

.product-card a {
    display: block;
    color: inherit;
}

.product-card a:hover {
    color: inherit;
}

.product-card__image {
    position: relative;
    padding-top: 75%;
    background: var(--bg-secondary);
    overflow: hidden;
}

.product-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-card__badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--white);
    z-index: 1;
}

.product-card__badge--peeling { background: var(--peeling); }
.product-card__badge--lotion { background: var(--lotion); }
.product-card__badge--cream { background: var(--cream); }
.product-card__badge--face-wash { background: var(--face-wash); }

.product-card__body {
    padding: var(--space-md);
}

.product-card__category {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.product-card__category--peeling { color: var(--peeling); }
.product-card__category--lotion { color: var(--lotion); }
.product-card__category--cream { color: var(--cream); }
.product-card__category--face-wash { color: var(--face-wash); }

.product-card__title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.product-card__volume {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.product-card__price {
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   11. Price Display
   -------------------------------------------------------------------------- */
.price-guest {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-style: italic;
}

.price-member {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.price-amount {
    font-family: var(--font-english);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary);
}

.price-tax-excl {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.price-tax-incl {
    font-size: 0.75rem;
    color: var(--text-light);
}

.price-label {
    font-size: 0.6875rem;
    color: var(--gold-dark);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   12. Product Detail
   -------------------------------------------------------------------------- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    max-width: var(--container-max);
    margin: 0 auto;
}

.product-detail__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
}

.product-detail__image img {
    width: 100%;
    height: auto;
}

.product-detail__image-inner {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    overflow: hidden;
}

.product-detail__image-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-md);
}

.product-detail__image-inner .product-initials {
    font-size: 4rem;
    opacity: 0.5;
}

.product-detail__info {
    padding: var(--space-xs) 0;
}

.product-detail__category-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: 100px;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
    background: var(--bg);
    color: var(--text-secondary);
}

.product-detail__category-tag[data-cat="peeling"] {
    color: var(--peeling);
    background: var(--peeling-bg);
}
.product-detail__category-tag[data-cat="lotion"] {
    color: var(--lotion);
    background: var(--lotion-bg);
}
.product-detail__category-tag[data-cat="cream"] {
    color: var(--cream);
    background: var(--cream-bg);
}
.product-detail__category-tag[data-cat="face-wash"] {
    color: var(--face-wash);
    background: var(--face-wash-bg);
}

.product-detail[data-category="peeling"] .product-detail__image { border-color: var(--peeling); }
.product-detail[data-category="lotion"] .product-detail__image { border-color: var(--lotion); }
.product-detail[data-category="cream"] .product-detail__image { border-color: var(--cream); }
.product-detail[data-category="face-wash"] .product-detail__image { border-color: var(--face-wash); }

.product-detail[data-category="peeling"] .product-detail__price { color: var(--peeling); }
.product-detail[data-category="lotion"] .product-detail__price { color: var(--lotion); }
.product-detail[data-category="cream"] .product-detail__price { color: var(--cream); }
.product-detail[data-category="face-wash"] .product-detail__price { color: var(--face-wash); }

.product-detail__title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.product-detail__volume {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.product-detail__price-area {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.product-detail__price-label {
    display: block;
    font-size: 0.6875rem;
    color: var(--gold-dark);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.product-detail__price {
    display: block;
    font-family: var(--font-english);
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.product-detail__price-tax {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 4px;
}

.product-detail__price-guest {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-xs) 0;
}

.product-detail__actions {
    margin-bottom: var(--space-lg);
}

.product-detail__actions .cart-add-form {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.product-detail__actions .btn--lg {
    flex: 1;
    min-width: 200px;
}

.product-detail__apply-btn {
    width: 100%;
    text-align: center;
}

.product-detail__apply-note {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: var(--space-xs);
    text-align: center;
}

.product-detail__section-heading {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
}

.product-detail__description {
    margin-bottom: var(--space-lg);
}

.product-detail__description-body {
    font-size: 0.9375rem;
    line-height: 2;
    color: var(--text-secondary);
}

.product-detail__specs {
    margin-bottom: var(--space-lg);
}

.product-detail__specs-body {
    font-size: 0.9375rem;
    line-height: 2;
    color: var(--text-secondary);
}

/* Specifications table */
.spec-table {
    width: 100%;
    margin-top: var(--space-lg);
}

.spec-table th,
.spec-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 0.875rem;
}

.spec-table th {
    width: 30%;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg);
}

.spec-table td {
    color: var(--text-secondary);
}

/* Related products */
.related-products {
    grid-column: 1 / -1;
    padding: var(--space-xl) 0;
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.related-products__title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.related-products .product-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    border-top: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-products .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 34px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   13. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.5;
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn--primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn--gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn--gold:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn--outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn--outline-gold {
    background: transparent;
    color: var(--gold-dark);
    border-color: var(--gold);
}

.btn--outline-gold:hover {
    background: var(--gold);
    color: var(--white);
}

.btn--sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.8125rem;
}

.btn--lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

.btn--block {
    display: flex;
    width: 100%;
}

.btn:disabled,
.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   14. Forms
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-label .required {
    color: var(--error);
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input--error,
.form-select--error,
.form-textarea--error {
    border-color: var(--error);
}

.form-input--error:focus,
.form-select--error:focus,
.form-textarea--error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-error {
    font-size: 0.8125rem;
    color: var(--error);
    margin-top: 4px;
}

.form-help {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 4px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* --------------------------------------------------------------------------
   15. Login Page
   -------------------------------------------------------------------------- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px - 200px);
    padding: var(--space-xl) var(--space-md);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
}

.login-card__header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.login-card__title {
    font-family: var(--font-english);
    font-size: 1.75rem;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.login-card__subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   16. Flash Messages
   -------------------------------------------------------------------------- */
.flash-message {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    animation: slideDown 0.3s ease;
}

.flash-message--success {
    background: #E8F8EF;
    color: #1B7A3D;
    border: 1px solid #A3E4BC;
}

.flash-message--error {
    background: #FDEDEC;
    color: #C0392B;
    border: 1px solid #F5B7B1;
}

.flash-message--info {
    background: #EBF5FB;
    color: #1A5276;
    border: 1px solid #AED6F1;
}

.flash-message--warning {
    background: #FEF5E7;
    color: #935116;
    border: 1px solid #F9E79F;
}

.flash-message__close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
    color: inherit;
}

.flash-message__close:hover {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: #3D2B1F;
    color: #FFFFFF;
    padding: 48px 40px 0;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-xl);
    padding-bottom: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.footer-logo {
    font-family: var(--font-english);
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFFFFF;
    letter-spacing: 0.05em;
}

.footer-brand {
    margin-bottom: var(--space-sm);
}

.footer-company {
    font-family: var(--font-english);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.footer-heading {
    font-family: var(--font-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--space-md);
}

.footer-nav-list a {
    font-size: 0.9rem;
    color: #C9A84C;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-nav-list a:hover {
    color: #E8C97A;
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    color: #C9A84C;
    padding: 6px 0;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: #E8C97A;
}

.footer-bottom {
    background: #2A1E15;
    color: #fff;
    text-align: center;
    padding: var(--space-sm) 0;
    margin: 0 -40px;
}

.footer-bottom .copyright {
    font-size: 0.8rem;
    font-family: var(--font-english);
    letter-spacing: 0.05em;
    color: #fff;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #fff;
    font-family: var(--font-english);
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   18. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
    padding: var(--space-sm) 0;
    font-size: 0.8125rem;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .separator {
    margin: 0 var(--space-xs);
    color: var(--text-light);
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   19. Product Image Placeholder
   -------------------------------------------------------------------------- */
.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font-english);
    font-size: 2rem;
    font-weight: 300;
    color: var(--white);
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.product-placeholder--peeling {
    background: linear-gradient(135deg, #2E86C1, #1A5276);
}

.product-placeholder--lotion {
    background: linear-gradient(135deg, #1ABC9C, #16A085);
}

.product-placeholder--cream {
    background: linear-gradient(135deg, #8E44AD, #6C3483);
}

.product-placeholder--face-wash {
    background: linear-gradient(135deg, #E67E22, #D35400);
}

/* --------------------------------------------------------------------------
   20. Quantity Selector
   -------------------------------------------------------------------------- */
.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-selector__btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    background: var(--bg);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.qty-selector__btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.qty-selector__input {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
}

.qty-selector__input::-webkit-inner-spin-button,
.qty-selector__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --------------------------------------------------------------------------
   21. Accordion
   -------------------------------------------------------------------------- */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion__item {
    border-bottom: 1px solid var(--border);
}

.accordion__item:last-child {
    border-bottom: none;
}

.accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--white);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
    width: 100%;
    text-align: left;
}

.accordion__header:hover {
    background: var(--bg);
}

.accordion__icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.accordion__icon::before,
.accordion__icon::after {
    content: '';
    position: absolute;
    background: var(--text-secondary);
    transition: var(--transition);
}

.accordion__icon::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion__icon::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion__item.active .accordion__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion__content {
    padding: 0 var(--space-md) var(--space-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --------------------------------------------------------------------------
   22. Category Filter (Products Page)
   -------------------------------------------------------------------------- */
.category-filter {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.category-filter__btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--white);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-filter__btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.category-filter__btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   23. Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-lg) 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   24. Tables
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg);
}

/* --------------------------------------------------------------------------
   25. Cards (Generic)
   -------------------------------------------------------------------------- */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card__header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.card__body {
    padding: var(--space-md);
}

.card__footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

/* --------------------------------------------------------------------------
   26. Status Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-xs);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge--success {
    background: #E8F8EF;
    color: #1B7A3D;
}

.badge--error {
    background: #FDEDEC;
    color: #C0392B;
}

.badge--info {
    background: #EBF5FB;
    color: #1A5276;
}

.badge--warning {
    background: #FEF5E7;
    color: #935116;
}

/* --------------------------------------------------------------------------
   27. Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.pt-xs { padding-top: var(--space-xs); }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-xs { padding-bottom: var(--space-xs); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.w-100 { width: 100%; }

/* --------------------------------------------------------------------------
   28. Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate-slideUp {
    animation: slideUp 0.5s ease;
}

/* --------------------------------------------------------------------------
   29. Mobile Navigation Overlay
   -------------------------------------------------------------------------- */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 105;
    transition: right 0.3s ease;
    padding: var(--space-2xl) var(--space-md) var(--space-md);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    display: block;
    padding: var(--space-sm) 0;
    font-size: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:hover {
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   30. Responsive
   -------------------------------------------------------------------------- */

/* Tablet: <= 1024px */
@media (max-width: 1024px) {
    .product-detail {
        gap: var(--space-lg);
    }

    .product-detail__title {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }
}

/* Small Tablet / Large Phone: <= 768px */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .hamburger {
        display: flex;
    }

    .main-nav .nav-links,
    .main-nav .nav-actions {
        display: none;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .hero {
        padding: var(--space-xl) 0;
    }

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

    .section-inner {
        padding: 0 var(--space-sm);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .product-detail__image {
        max-width: 500px;
        margin: 0 auto;
    }

    .product-detail__image-inner {
        aspect-ratio: 4 / 3;
    }

    .product-detail__actions .cart-add-form {
        flex-direction: column;
        align-items: stretch;
    }

    .product-detail__actions .btn--lg {
        min-width: unset;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-inner {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer-nav-list {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .site-footer {
        padding: 32px 24px 0;
    }

    .footer-bottom {
        margin: 0 -24px;
    }

    .section {
        padding: var(--space-lg) 0;
    }

    .login-card {
        padding: var(--space-lg);
    }
}

/* Phone: <= 480px */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header-inner {
        height: 60px;
    }

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

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

    .hero-cta {
        padding: var(--space-xs) var(--space-lg);
        font-size: 0.875rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .btn--lg {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9375rem;
    }

    .category-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--space-xs);
    }

    .category-filter__btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .login-card {
        padding: var(--space-md);
        box-shadow: var(--shadow-sm);
    }

    .product-detail__price {
        font-size: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   31. Cart Badge (Header)
   -------------------------------------------------------------------------- */
.nav-cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -12px;
    background: var(--error);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 4px;
}

/* --------------------------------------------------------------------------
   32. Cart Page
   -------------------------------------------------------------------------- */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-lg);
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.cart-item-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--space-md);
    align-items: center;
}

.cart-item-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.cart-item-name:hover {
    color: var(--primary);
}

.cart-item-price {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cart-qty-form {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cart-update-btn {
    font-size: 0.75rem !important;
}

.cart-remove-btn {
    color: var(--error);
    font-size: 0.8125rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.cart-remove-btn:hover {
    text-decoration: underline;
}

.cart-item-subtotal {
    text-align: right;
    min-width: 100px;
}

.cart-item-subtotal-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
}

.cart-item-subtotal-value {
    font-family: var(--font-english);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.cart-summary {
    position: sticky;
    top: 88px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 0.9375rem;
}

.cart-summary-total {
    border-top: 2px solid var(--text-primary);
    margin-top: var(--space-xs);
    padding-top: var(--space-sm);
    font-size: 1.125rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   33. Order Steps
   -------------------------------------------------------------------------- */
.order-steps {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding: var(--space-md) 0;
}

.order-step {
    font-size: 0.875rem;
    color: var(--text-light);
    position: relative;
    padding-bottom: var(--space-xs);
}

.order-step.active {
    color: var(--primary);
    font-weight: 600;
}

.order-step.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.order-step.done {
    color: var(--success);
}

/* --------------------------------------------------------------------------
   34. Form Actions
   -------------------------------------------------------------------------- */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   35. MyPage Grid
   -------------------------------------------------------------------------- */
.mypage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.mypage-card {
    transition: var(--transition);
    color: var(--text-primary);
}

.mypage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--primary);
}

.mypage-card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

/* --------------------------------------------------------------------------
   36. Product Card Quick Add
   -------------------------------------------------------------------------- */
.product-card-quick-add {
    padding: 0 var(--space-md) var(--space-md);
}

/* --------------------------------------------------------------------------
   37. Cart Add Form (Detail Page)
   -------------------------------------------------------------------------- */
.cart-add-form {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* --------------------------------------------------------------------------
   38. Nav Enhancements
   -------------------------------------------------------------------------- */
.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-item {
    position: relative;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    transition: var(--transition-fast);
}

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

.nav-item-dropdown:hover .nav-dropdown {
    display: block;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    padding: var(--space-xs) 0;
    z-index: 50;
}

.nav-dropdown-link {
    display: block;
    padding: var(--space-xs) var(--space-md);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.nav-dropdown-link:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-logout-form {
    display: inline;
}

.nav-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
}

.nav-logout-btn:hover {
    color: var(--error);
}

/* --------------------------------------------------------------------------
   Responsive additions for Phase 2
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .mypage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .cart-item-inner {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .cart-item-subtotal {
        text-align: left;
    }

    .cart-summary {
        position: static;
    }

    .mypage-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .order-steps {
        gap: var(--space-md);
    }

    .nav-list {
        display: none;
    }
}

@media (max-width: 480px) {
    .mypage-grid {
        grid-template-columns: 1fr;
    }

    .cart-item-actions {
        flex-wrap: wrap;
    }
}

/* Print */
@media print {
    .site-header,
    .site-footer,
    .hamburger,
    .mobile-nav,
    .mobile-nav-overlay,
    .btn,
    .category-filter {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-lg) 0;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s ease;
}

.pagination__link:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination__link--active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination__link--active:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination__link--disabled {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination__link--disabled:hover {
    background: var(--white);
    border-color: var(--border);
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   Address Cards
   -------------------------------------------------------------------------- */
.address-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

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

.address-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.address-card__label {
    font-weight: 700;
    font-size: 1rem;
}

.address-card__name {
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.address-card__detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.address-card__actions {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   Checkbox style
   -------------------------------------------------------------------------- */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    font-size: 0.95rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* --------------------------------------------------------------------------
   Product List Page — Design OS v2
   -------------------------------------------------------------------------- */

/* --- Layout: Sidebar + Main --- */
.products-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 200px);
}

.category-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    padding: var(--space-lg) 0;
    background: var(--white);
}

.sidebar-title {
    font-family: var(--font-english);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0 var(--space-md) var(--space-sm);
    margin-bottom: var(--space-xs);
}

.category-filter-list {
    list-style: none;
}

.category-filter-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--space-sm) var(--space-md);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-filter-link:hover {
    color: var(--text-primary);
    background: var(--bg);
}

.category-filter-link.is-active {
    color: var(--text-primary);
    font-weight: 500;
    background: var(--bg);
    border-left-color: var(--accent-color, var(--primary));
    color: var(--accent-color, var(--primary));
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.products-main {
    flex: 1;
    min-width: 0;
    padding: var(--space-lg);
}

/* --- Page Header (Breadcrumb + Title) --- */
.page-header {
    margin-bottom: var(--space-lg);
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    margin: 0 var(--space-xs);
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* --- Product Grid --- */
.products-main .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

/* --- Product Card --- */
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 34px rgba(0, 0, 0, 0.08);
}

.product-card[data-category="peeling"]:hover { border-color: var(--peeling); }
.product-card[data-category="lotion"]:hover { border-color: var(--lotion); }
.product-card[data-category="cream"]:hover { border-color: var(--cream); }
.product-card[data-category="face-wash"]:hover { border-color: var(--face-wash); }

/* --- Card Image Area --- */
.card-image {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-sm);
}

.card-image[data-cat="peeling"] { background: linear-gradient(135deg, #EBF5FB, #fff); }
.card-image[data-cat="lotion"] { background: linear-gradient(135deg, #E8F8F5, #fff); }
.card-image[data-cat="cream"] { background: linear-gradient(135deg, #F4ECF7, #fff); }
.card-image[data-cat="face-wash"] { background: linear-gradient(135deg, #FDF2E9, #fff); }

.placeholder-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.placeholder-icon svg {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    opacity: 0.35;
    display: block;
}

.card-image[data-cat="peeling"] .placeholder-icon svg { color: var(--peeling); }
.card-image[data-cat="lotion"] .placeholder-icon svg { color: var(--lotion); }
.card-image[data-cat="cream"] .placeholder-icon svg { color: var(--cream); }
.card-image[data-cat="face-wash"] .placeholder-icon svg { color: var(--face-wash); }

.placeholder-text {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* --- Card Body --- */
.card-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--primary);
}

.card-description {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

/* --- Card Tags --- */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-sm);
}

.tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--bg);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.product-card[data-category="peeling"] .tag { color: var(--peeling); background: var(--peeling-bg); }
.product-card[data-category="lotion"] .tag { color: var(--lotion); background: var(--lotion-bg); }
.product-card[data-category="cream"] .tag { color: var(--cream); background: var(--cream-bg); }
.product-card[data-category="face-wash"] .tag { color: var(--face-wash); background: var(--face-wash-bg); }

/* --- Card Meta (Price) --- */
.card-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: var(--space-xs);
    margin-bottom: var(--space-sm);
    border-top: 1px solid var(--border);
}

.card-meta .price-excl {
    font-family: var(--font-english);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.card-meta .price-excl small {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

.card-meta .price-incl {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

.card-meta .price-incl small {
    font-size: 0.7rem;
}

.card-meta .price-guest {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-style: italic;
}

/* --- Card Actions (Buttons) --- */
.card-actions {
    padding: 0 var(--space-md) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.btn-order-card {
    display: block;
    text-align: center;
    background: #1a3a5c;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 0;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-order-card:hover {
    background: #0f2840;
}

.btn-feature-page {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: transparent;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    white-space: nowrap;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.btn-feature-page:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.no-products {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
    font-size: 14px;
}

/* --- Product List: Mobile Nav Toggle --- */
.products-mobile-nav-toggle {
    display: none;
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 200;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: 0 2px 13px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.products-mobile-nav-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

/* --- Product List Responsive --- */
@media (max-width: 1024px) {
    .products-main .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-sidebar {
        display: none;
    }

    .products-mobile-nav-toggle {
        display: flex;
    }

    .products-main {
        padding: var(--space-md) var(--space-sm);
    }

    .products-main .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .page-title {
        font-size: 21px;
    }

    .products-layout {
        padding-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .products-main .product-grid {
        grid-template-columns: 1fr;
    }

    .card-title {
        font-size: 14px;
    }
}

/* --- Mobile Category Nav (Bottom Sheet) --- */
.products-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 13px rgba(0, 0, 0, 0.06);
    padding: var(--space-sm) var(--space-md);
}

.products-mobile-nav.open {
    display: block;
}

.products-mobile-nav .category-filter-list {
    display: flex;
    overflow-x: auto;
    gap: var(--space-xs);
    -webkit-overflow-scrolling: touch;
}

.products-mobile-nav .category-filter-link {
    border-left: none;
    border-top: 2px solid transparent;
    padding: var(--space-xs) var(--space-sm);
    white-space: nowrap;
    font-size: 13px;
}

.products-mobile-nav .category-filter-link.is-active {
    border-top-color: var(--accent-color, var(--primary));
    background: transparent;
}

/* --------------------------------------------------------------------------
   Legacy Card Classes (used by home/index.php and products/detail.php)
   -------------------------------------------------------------------------- */
.product-image-placeholder {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    position: relative;
}

.product-image-placeholder[data-cat="peeling"] { background: linear-gradient(135deg, var(--peeling-bg), #fff); }
.product-image-placeholder[data-cat="lotion"] { background: linear-gradient(135deg, var(--lotion-bg), #fff); }
.product-image-placeholder[data-cat="cream"] { background: linear-gradient(135deg, var(--cream-bg), #fff); }
.product-image-placeholder[data-cat="face-wash"] { background: linear-gradient(135deg, var(--face-wash-bg), #fff); }

.product-image-placeholder .placeholder-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.product-image-placeholder .placeholder-icon svg {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    opacity: 0.35;
    display: block;
}

.product-image-placeholder[data-cat="peeling"] .placeholder-icon svg { color: var(--peeling); }
.product-image-placeholder[data-cat="lotion"] .placeholder-icon svg { color: var(--lotion); }
.product-image-placeholder[data-cat="cream"] .placeholder-icon svg { color: var(--cream); }
.product-image-placeholder[data-cat="face-wash"] .placeholder-icon svg { color: var(--face-wash); }

.product-image-placeholder .product-initials {
    font-family: var(--font-english);
    font-size: 2rem;
    font-weight: 500;
    opacity: 0.4;
    letter-spacing: 0.05em;
}

.product-image-placeholder[data-cat="peeling"] .product-initials { color: var(--peeling); }
.product-image-placeholder[data-cat="lotion"] .product-initials { color: var(--lotion); }
.product-image-placeholder[data-cat="cream"] .product-initials { color: var(--cream); }
.product-image-placeholder[data-cat="face-wash"] .product-initials { color: var(--face-wash); }

.product-image-placeholder .placeholder-text {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: 0.1em;
}

.product-card-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-name {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.product-card-description {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.product-card-price {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: var(--space-xs);
    border-top: 1px solid var(--border);
}

.product-card-price .price-excl {
    font-family: var(--font-english);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.product-card-price .price-excl small {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

.product-card-price .price-incl {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

.product-card-price .price-incl small {
    font-size: 0.7rem;
}

.product-card-price .price-guest {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-style: italic;
}

