/* === Stitch & Story - Main Stylesheet === */
/* Design: Warm Cream + Blush/Sage + Playfair Display */

:root {
    --cream: #FDF6F0;
    --cream-dark: #F5EDE4;
    --blush: #E8A9A9;
    --blush-light: #F5D5D5;
    --sage: #9CAF88;
    --sage-light: #D4E0C8;
    --brown: #5A4A3A;
    --brown-light: #8B7D6B;
    --brown-dark: #3A2A1A;
    --white: #FFFFFF;
    --border: #E8DED4;
    --shadow: 0 2px 12px rgba(90, 74, 58, 0.08);
    --radius: 12px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--brown);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--brown);
}

.logo-icon { font-size: 28px; }

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--brown-light);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.cart-link {
    position: relative;
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--blush);
    color: white;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* === Hero === */
.hero-section {
    background: linear-gradient(135deg, var(--cream) 0%, var(--blush-light) 50%, var(--sage-light) 100%);
    padding: 80px 24px;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 48px;
    color: var(--brown);
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--brown-light);
    margin-bottom: 32px;
    font-weight: 300;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background: var(--brown-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 74, 58, 0.2);
}

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

.btn-secondary:hover {
    background: var(--cream);
}

.btn-large {
    padding: 14px 36px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--brown);
}

.btn-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.btn-remove:hover { color: #e74c3c; }

/* === Sections === */
.section-header {
    text-align: center;
    padding: 48px 24px 32px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--brown);
    font-weight: 500;
}

.section-header .view-all {
    color: var(--brown-light);
    text-decoration: none;
    font-size: 14px;
    margin-top: 8px;
    display: inline-block;
}

.section-header .view-all:hover { color: var(--brown); }

/* === Categories === */
.categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--brown);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--blush);
}

.category-icon { font-size: 36px; margin-bottom: 8px; }

.category-card h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--brown-light);
}

/* === Product Grid === */
.featured-section, .new-arrivals-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

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

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--brown);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(90, 74, 58, 0.1);
}

.product-image {
    height: 280px;
    overflow: hidden;
    background: var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.placeholder-img {
    font-size: 64px;
    opacity: 0.4;
}

.placeholder-img.large { font-size: 96px; }
.placeholder-img.small { font-size: 32px; }

.product-info {
    padding: 16px;
}

.product-info h3 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-category {
    font-size: 12px;
    color: var(--brown-light);
    margin-bottom: 8px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price {
    font-weight: 600;
    font-size: 16px;
    color: var(--brown);
}

.original-price {
    font-size: 13px;
    color: #bbb;
    text-decoration: line-through;
}

/* === Products Page === */
.products-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--brown);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--brown-light);
    font-size: 14px;
}

.products-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
}

.filters-sidebar h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--brown-light);
    margin-bottom: 8px;
    margin-top: 24px;
    letter-spacing: 1px;
}

.filters-sidebar h3:first-child { margin-top: 0; }

.filter-list {
    list-style: none;
    margin-bottom: 24px;
}

.filter-list li { margin-bottom: 4px; }

.filter-list a {
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--brown-light);
    font-size: 14px;
    transition: all 0.15s;
}

.filter-list a:hover { background: var(--cream-dark); color: var(--brown); }

.filter-list a.active {
    background: var(--brown);
    color: var(--white);
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 0;
}

.page-link {
    text-decoration: none;
    color: var(--brown);
    font-size: 14px;
    font-weight: 500;
}

.page-link:hover { color: var(--blush); }

.page-info {
    font-size: 13px;
    color: var(--brown-light);
}

/* === Product Detail === */
.product-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--brown-light);
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: var(--brown-light);
    text-decoration: none;
}

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

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.product-gallery .main-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.thumbnails {
    display: flex;
    gap: 8px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnail:hover { border-color: var(--blush); }

.product-info .product-category-badge {
    display: inline-block;
    background: var(--sage-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--sage);
    margin-bottom: 16px;
}

.product-info h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.pricing { margin-bottom: 24px; }

.pricing .price { font-size: 28px; }

.product-description {
    color: var(--brown-light);
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: 15px;
}

.product-meta { margin-bottom: 24px; }

.meta-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.meta-label { color: var(--brown-light); min-width: 100px; }

.meta-value { color: var(--brown); font-weight: 500; }

.add-to-cart-form { margin-bottom: 16px; }

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.quantity-selector label {
    font-size: 14px;
    color: var(--brown-light);
}

.quantity-selector input {
    width: 64px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.shipping-note {
    font-size: 13px;
    color: var(--sage);
    font-weight: 500;
}

.related-products h2 {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--brown);
    margin-bottom: 24px;
}

/* === Cart === */
.cart-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.cart-items { border-top: 1px solid var(--border); }

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 80px 80px 30px;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info h3 a {
    text-decoration: none;
    color: var(--brown);
    font-size: 14px;
    font-weight: 500;
}

.cart-item-info h3 a:hover { color: var(--blush); }

.item-price { font-size: 13px; color: var(--brown-light); }

.cart-item-qty input {
    width: 48px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
}

.cart-item-total {
    font-weight: 600;
    font-size: 14px;
}

.cart-summary {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    align-self: start;
}

.cart-summary h3 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
    font-size: 16px;
}

.cart-summary .btn { margin-top: 12px; }

.cart-summary .btn-secondary { margin-top: 4px; }

.empty-cart {
    text-align: center;
    padding: 64px 24px;
}

.empty-icon { font-size: 64px; margin-bottom: 16px; }

.empty-cart h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 8px;
}

.empty-cart p { color: var(--brown-light); margin-bottom: 24px; }

/* === Checkout === */
.checkout-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.checkout-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border);
}

.checkout-form h2 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--brown-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--brown);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--blush);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-note {
    text-align: center;
    font-size: 12px;
    color: var(--brown-light);
    margin-top: 16px;
}

.checkout-summary {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    align-self: start;
}

.checkout-summary h3 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* === Order Success === */
.order-success-page {
    display: flex;
    justify-content: center;
    padding: 64px 24px;
}

.success-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border);
}

.success-icon { font-size: 48px; margin-bottom: 16px; }

.success-card h1 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 8px;
}

.order-number {
    font-size: 14px;
    color: var(--brown-light);
    margin-bottom: 16px;
    font-family: monospace;
}

.order-details {
    text-align: left;
    margin: 24px 0;
    padding: 16px;
    background: var(--cream);
    border-radius: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
}

.status-pending { color: #E65100; font-weight: 500; }

/* === About Page === */
.about-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 24px;
}

.about-hero {
    text-align: center;
    margin-bottom: 48px;
}

.about-hero h1 {
    font-family: var(--font-display);
    font-size: 36px;
    margin-bottom: 12px;
}

.about-hero p {
    font-size: 16px;
    color: var(--brown-light);
}

.about-section {
    margin-bottom: 32px;
}

.about-section h2 {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 12px;
}

.about-section p {
    color: var(--brown-light);
    line-height: 1.8;
    font-size: 15px;
}

/* === Footer === */
.site-footer {
    background: var(--brown);
    color: var(--cream);
    margin-top: 64px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-section h3 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 12px;
}

.footer-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--blush);
}

.footer-section p, .footer-section a {
    font-size: 14px;
    color: rgba(253, 246, 240, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
}

.footer-section a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(253, 246, 240, 0.1);
    text-align: center;
    padding: 16px 24px;
    font-size: 13px;
    color: rgba(253, 246, 240, 0.5);
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .products-layout { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .cart-content { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 60px 1fr; gap: 8px; }
    .footer-content { grid-template-columns: 1fr; }
    .nav-links { gap: 12px; }
    .nav-link { font-size: 12px; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Language Switcher ── */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    margin: 0 4px;
}
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 4px 22px 4px 8px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #555;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    transition: border-color 0.2s;
}
.lang-select:hover {
    border-color: #d4a574;
}
.lang-select:focus {
    outline: none;
    border-color: #d4a574;
}

@media (max-width: 768px) {
    .lang-switcher { margin: 0 2px; }
    .lang-select { font-size: 11px; padding: 3px 18px 3px 5px; }
}
