/* ============================================
   Handmade Shop - Elegant Pastel Theme
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

/* CSS Variables */
:root {
    --bg-color: #FFF7F5;
    --bg-light: #FFFBFA;
    --primary: #E8AFA6;
    --primary-dark: #D89A8F;
    --accent: #C08497;
    --accent-dark: #A66B7D;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --white: #FFFFFF;
    --shadow-soft: 0 4px 15px rgba(192, 132, 151, 0.15);
    --shadow-medium: 0 8px 25px rgba(192, 132, 151, 0.2);
    --shadow-hover: 0 12px 35px rgba(192, 132, 151, 0.25);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--text-dark);
}

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

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

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary);
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-medium);
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--accent);
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-icon:hover {
    background: var(--primary);
    color: var(--white);
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--primary) 50%, var(--accent) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    color: var(--white);
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.95;
}

.hero-accent {
    color: var(--bg-color);
    font-style: italic;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--white);
    color: var(--accent);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: var(--bg-light);
}

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

.btn-secondary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

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

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Categories Section
   ============================================ */
.categories-section {
    padding: 30px 0 20px;
    background: var(--white);
    position: sticky;
    top: 60px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.categories-section .section-header {
    display: none; /* Hide on redesigned version */
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-medium);
    font-size: 1.1rem;
}

.categories-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 20px 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-grid::-webkit-scrollbar {
    display: none;
}

/* Category Chips */
.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.category-chip:hover {
    background: var(--primary);
    color: var(--white);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(192, 132, 151, 0.3);
}

.chip-icon {
    font-size: 1.1rem;
}

.chip-label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Filter Bar */
.filter-bar {
    background: var(--white);
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.filter-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
    white-space: nowrap;
}

.rating-filter-chips {
    display: flex;
    gap: 6px;
}

.rating-filter-chip {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid #eee;
    background: var(--white);
    cursor: pointer;
    font-size: 0.82rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-medium);
    transition: var(--transition);
    white-space: nowrap;
}

.rating-filter-chip:hover {
    border-color: var(--primary);
    color: var(--accent);
}

.rating-filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-color: var(--accent);
}

.sort-select {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #eee;
    background: var(--white);
    font-size: 0.82rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 28px;
    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 10px center;
}

.sort-select:focus {
    border-color: var(--primary);
}

/* Legacy category cards - keep for desktop grid option */
.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    cursor: pointer;
}

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

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   Products Section
   ============================================ */
.products-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

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

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: none;
}

.product-action-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.product-rating-stars {
    color: #F5A623;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.product-rating-count {
    color: var(--text-light);
    font-size: 0.78rem;
}

.product-description {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.add-to-cart-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

.add-to-cart-btn.added {
    background: #4CAF50;
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================
   Loading States
   ============================================ */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Cart Sidebar
   ============================================ */
.cart-overlay,
.wishlist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1100;
}

.cart-overlay.active,
.wishlist-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar,
.wishlist-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    /* 100vh on iOS Safari extends behind the browser toolbar, which pushed the
       footer (Total + Proceed to Checkout) off screen with no way to reach it -
       the footer sits outside the scrolling item list, so the drawer itself
       never scrolled. dvh tracks the actually-visible viewport. */
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 1200;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active,
.wishlist-sidebar.active {
    right: 0;
}

.cart-header,
.wishlist-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3,
.wishlist-header h3 {
    font-size: 1.3rem;
}

.cart-close {
    width: 35px;
    height: 35px;
    background: var(--bg-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-close:hover {
    background: var(--primary);
    color: var(--white);
}

.cart-items,
.wishlist-items {
    flex: 1;
    min-height: 0;              /* required for overflow to work inside a flex column */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.cart-item-price {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cart-item-remove {
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
}

.cart-item-remove:hover {
    color: #e74c3c;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cart-footer {
    padding: 25px;
    padding-bottom: calc(25px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    background: var(--bg-light);
    flex-shrink: 0;   /* never let a long item list squeeze the checkout button */
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-total-label {
    font-weight: 500;
    color: var(--text-medium);
}

.cart-total-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ============================================
   Login Page Styles
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--primary) 100%);
}

.auth-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-medium);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #eee;
    border-radius: var(--border-radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

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

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.divider span {
    padding: 0 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.google-btn {
    width: 100%;
    padding: 14px;
    background: var(--white);
    border: 2px solid #eee;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.google-btn:hover {
    border-color: var(--accent);
    background: var(--bg-light);
}

.google-btn img {
    width: 22px;
    height: 22px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-medium);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 500;
}

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

.error-message {
    background: #fee;
    color: #c00;
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.success-message {
    background: #efe;
    color: #060;
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ============================================
   Product Detail Page
   ============================================ */
.product-detail {
    padding: 60px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.product-main-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.product-main-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.product-detail-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.product-detail-description {
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 30px;
}

.product-options {
    margin-bottom: 30px;
}

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

.quantity-selector label {
    font-weight: 500;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 2px solid #eee;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.quantity-input button {
    width: 45px;
    height: 45px;
    background: var(--bg-color);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

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

.quantity-input input {
    width: 60px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
}

.product-actions-detail {
    display: flex;
    gap: 15px;
}

/* ============================================
   Notifications / Toasts
   ============================================ */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--white);
    padding: 15px 25px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: var(--transition);
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #4CAF50;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid var(--accent);
}

.toast-icon {
    font-size: 1.3rem;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error .toast-icon {
    color: #e74c3c;
}

/* ============================================
   User Menu Styles
   ============================================ */
.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user-menu .nav-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.nav-user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.nav-user-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Hamburger Menu Button
   ============================================ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transition: var(--transition);
}

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

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-drawer.active {
    left: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-drawer-header .logo {
    font-size: 1.4rem;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-medium);
    padding: 5px;
}

.mobile-search {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.mobile-search form {
    display: flex;
    gap: 10px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;   /* without this the input cannot shrink and pushes the button off-screen */
    width: 0;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 25px;
    font-size: 0.95rem;
}

.mobile-search button {
    background: var(--accent);
    border: none;
    border-radius: 10px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-links {
    list-style: none;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mobile-nav-links li a {
    display: block;
    padding: 15px 20px;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.mobile-nav-links li a:hover {
    background: var(--bg-color);
    color: var(--accent);
}

.mobile-user-section {
    padding: 20px;
}

.mobile-auth-links .btn {
    width: 100%;
    justify-content: center;
}

.mobile-user-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 10px;
}

.mobile-user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-user-name {
    font-weight: 500;
    font-size: 1rem;
}

.mobile-user-menu .btn {
    width: 100%;
    justify-content: center;
}

.desktop-only {
    display: flex;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .categories-grid {
        /* Keep horizontal scroll on tablets */
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-detail-grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .nav-container {
        justify-content: space-between;
    }
    
    /* Absolute centring collided with the action icons once there were two of
       them (wishlist + cart): the logo sat underneath them. Centre it with flex
       instead, so it shares the row and shrinks rather than overlapping. */
    .navbar .logo {
        position: static;
        left: auto;
        transform: none;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        font-size: 1.45rem;
        gap: 7px;
    }

    .navbar .logo .logo-icon { font-size: 1.6rem; flex-shrink: 0; }

    .nav-container { gap: 8px; }
    .nav-actions { flex-shrink: 0; }
    
    .nav-actions {
        gap: 10px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .categories-section {
        top: 55px;
        padding: 15px 0 10px;
    }
    
    .categories-grid {
        padding: 5px 15px 10px;
        gap: 10px;
    }
    
    .category-chip {
        padding: 8px 16px;
    }
    
    .chip-label {
        font-size: 0.85rem;
    }
    
    .filter-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .rating-filter-chip {
        padding: 4px 10px;
        font-size: 0.78rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        position: static;
    }
    
    .auth-container {
        padding: 30px 20px;
    }
    
    .auth-header .logo {
        margin-bottom: 15px !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .auth-header h1 {
        font-size: 1.6rem;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    /* Narrow phones: the flower is decorative, the wordmark is the identity. */
    .navbar .logo { font-size: 1.15rem; }
    .navbar .logo .logo-icon { display: none; }
    
    .nav-actions {
        gap: 8px;
    }
    
    .nav-actions #search-form input {
        width: 80px !important;
        padding: 5px 10px !important;
    }
    
    .nav-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .nav-user-menu .nav-icon {
        width: 28px;
        height: 28px;
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: -3px;
        right: -3px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .categories-section {
        top: 50px;
    }
    
    .category-chip {
        padding: 6px 12px;
    }
    
    .chip-icon {
        font-size: 1rem;
    }
    
    .chip-label {
        font-size: 0.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .product-actions-detail {
        flex-direction: column;
    }
    
    .btn-lg {
        width: 100%;
    }
}


/* ===== Wishlist ===== */

/* The heart lives in the existing .product-actions overlay, so it inherits
   .product-action-btn sizing - only the saved state is new. */
.product-action-btn.wishlist-btn {
    font-size: 1.15rem;
    line-height: 1;
    border: none;
    color: var(--text-medium);
}

.product-action-btn.wishlist-btn.saved {
    background: var(--accent);
    color: var(--white);
}

.product-action-btn.wishlist-btn.is-busy {
    opacity: .55;
    pointer-events: none;
}

/* Matches .cart-count so the two nav badges are visually identical. */
.wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.wishlist-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
}

/* Reuses the cart item layout so both drawers read the same. */
.wishlist-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f2f2f2;
}

.wishlist-item:last-child { border-bottom: none; }

.wishlist-item-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-color);
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-item-details { flex: 1; min-width: 0; }

.wishlist-item-name {
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.wishlist-item-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.wishlist-item-stock {
    font-size: 0.78rem;
    color: #b26a00;
    margin-top: 3px;
}

.wishlist-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.wishlist-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-medium);
}

.wishlist-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    .wishlist-sidebar { width: 100%; right: -100%; }

    /* Full-width drawer on a phone: keep the buttons compact so the product
       name is not squeezed into a four-line wrap. */
    .wishlist-item-image { width: 58px; height: 58px; }
    .wishlist-item-actions .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    .wishlist-item-name { font-size: 0.88rem; }
}

/* Detail-page wishlist button (a labelled .btn, not the round icon) */
#add-to-wishlist-detail.saved {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* ============================================
   Reviews Section
   ============================================ */
.reviews-section {
    padding: 60px 0;
    background: var(--white);
}

.reviews-header {
    margin-bottom: 30px;
}

.reviews-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reviews-avg-stars {
    color: #F5A623;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.reviews-avg-score {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.reviews-count {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Review Form */
.review-form-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
}

.review-form-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.review-star-input {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.star-input {
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.15s ease;
    color: #ddd;
    user-select: none;
}

.star-input:hover {
    transform: scale(1.2);
}

.star-input.active {
    color: #F5A623;
}

.review-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 18px;
    border: 2px solid #eee;
    border-radius: var(--border-radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.review-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.review-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

.review-login-prompt {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px 30px;
    margin-bottom: 30px;
    color: var(--text-medium);
}

.review-login-prompt a {
    color: var(--accent);
    font-weight: 500;
}

.review-login-prompt a:hover {
    text-decoration: underline;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.review-card.own-review {
    border: 2px solid var(--primary);
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    overflow: hidden;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-body {
    flex: 1;
    min-width: 0;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 500;
    color: var(--text-dark);
}

.review-stars {
    color: #F5A623;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.review-date {
    color: var(--text-light);
    font-size: 0.82rem;
}

.review-comment {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.reviews-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.reviews-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .reviews-section {
        padding: 40px 0;
    }

    .reviews-header h2 {
        font-size: 1.6rem;
    }

    .review-form-card {
        padding: 20px;
    }

    .review-card {
        padding: 18px;
    }

    .review-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .review-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .review-card {
        flex-direction: column;
        gap: 10px;
    }

    .review-meta {
        gap: 6px;
    }

    .star-input {
        font-size: 1.5rem;
    }
}


/* ===== Share your design =====
   A centred sheet rather than a side drawer: it is a form to fill in, not a
   list to scan, and it must not fight the cart drawer for the right edge. */
.design-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1300;
}

.design-overlay.active { opacity: 1; visibility: visible; }

.design-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -48%) scale(.98);
    width: min(520px, calc(100vw - 32px));
    /* dvh so the footer button is never behind a phone browser toolbar */
    max-height: 88vh;
    max-height: 88dvh;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    z-index: 1400;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.design-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.design-head {
    padding: 22px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.design-head h3 { font-size: 1.25rem; }

.design-body {
    padding: 22px 25px;
    overflow-y: auto;
    min-height: 0;          /* lets the body scroll inside the flex column */
    -webkit-overflow-scrolling: touch;
}

.design-intro { color: var(--text-medium); font-size: .92rem; margin-bottom: 18px; }

.design-drop {
    display: block;
    border: 2px dashed #e6d7db;
    border-radius: 12px;
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-color);
}

.design-drop:hover { border-color: var(--accent); background: #fff7f5; }
.design-drop input { display: none; }
.design-drop-text { display: block; font-weight: 500; margin-bottom: 4px; }
.design-drop small { color: #999; font-size: .78rem; }

.design-drop img {
    display: none;
    max-width: 100%;
    max-height: 190px;
    margin: 14px auto 0;
    border-radius: 10px;
}

.design-label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 500;
    font-size: .92rem;
}

.design-modal input[type="text"],
.design-modal textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: .93rem;
    resize: vertical;
}

.design-modal input[type="text"]:focus,
.design-modal textarea:focus { outline: none; border-color: var(--accent); }

.design-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: #E7F7EE;
    border: 1px solid #9FD9B8;
    border-radius: 10px;
    color: #1F7A43;
    font-size: .85rem;
}

.design-foot {
    padding: 18px 25px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

/* Unpriced custom lines read as text, never as a currency amount */
.price-on-request {
    color: var(--accent);
    font-weight: 600;
    font-size: .88rem;
}

.custom-badge {
    display: inline-block;
    font-size: .68rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: #F7E7EB;
    color: #8E4E64;
    margin-left: 6px;
    vertical-align: middle;
}
