﻿:root {
    --color-primary: #1a1a1a;
    --color-secondary: #6b5b4d;
    --color-accent: #8b7355;
    --color-bg: #fafaf8;
    --color-surface: #ffffff;
    --color-border: #e8e6e1;
    --color-text: #2c2c2c;
    --color-text-light: #6b6b6b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background-color: var(--color-bg);
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    padding-bottom: 40px;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--color-primary);
}

/* ===== SHOP HEADER SECTION ===== */
.shop-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 3rem 0 2rem 0;
    text-align: center;
    position: relative;
}

.shop-logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.shop-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    padding: 3px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #0d6efd;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
}

.shop-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.shop-tagline {
    color: var(--color-text-light);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.5;
}

.shop-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-shop-action {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-shop-action:hover {
        background-color: var(--color-primary);
        color: white;
        border-color: var(--color-primary);
        transform: translateY(-2px);
    }

/* ===== STICKY TOOLBAR (Search + Sort) ===== */
.search-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.toolbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 900px; /* Constrain width for better look */
    margin: 0 auto;
}

.search-input-group {
    position: relative;
    flex-grow: 1;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-size: 0.95rem;
    transition: var(--transition);
}

    .search-input:focus {
        outline: none;
        border-color: var(--color-accent);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(139, 115, 85, 0.1);
    }

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
    min-width: 160px;
}

.form-select-custom {
    padding: 0.8rem 2rem 0.8rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
    width: 100%;
    appearance: none; /* Hide default arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
}

    .form-select-custom:focus {
        outline: none;
        border-color: var(--color-accent);
        box-shadow: 0 0 0 4px rgba(139, 115, 85, 0.1);
    }


/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columns Desktop */
    gap: 1.5rem;
}

.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
        border-color: var(--color-accent);
    }

.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4; /* Classic Portrait Ratio */
    overflow: hidden;
    background: #f4f4f4;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.product-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product-category {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.product-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

/* Pill Button Logic */
.btn-view {
    margin-top: auto; /* Pushes button to bottom */
    display: inline-block;
    width: 100%;
    padding: 0.6rem 0;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: var(--transition);
}

    .btn-view:hover {
        background: var(--color-primary);
        color: white;
        border-color: var(--color-primary);
    }

/* ===== PAGINATION ===== */
.pagination-container {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.pagination-classic {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-link-classic {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Circle shape */
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: var(--color-surface);
    transition: var(--transition);
}

    .page-link-classic:hover {
        border-color: var(--color-primary);
        color: var(--color-primary);
        transform: translateY(-2px);
    }

.page-item-classic.active .page-link-classic {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.page-item-classic.disabled .page-link-classic {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f8f9fa;
}

.page-text {
    width: auto;
    padding: 0 15px;
    border-radius: 20px; /* Pill shape for Next/Prev */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 Columns Tablet */
    }
}

@media (max-width: 576px) {
    .shop-name {
        font-size: 1.5rem;
    }

    .shop-tagline {
        font-size: 0.85rem;
        padding: 0 1rem;
    }

    /* Responsive Toolbar */
    .toolbar-wrapper {
        flex-direction: column;
        gap: 0.8rem;
    }

    .sort-dropdown {
        width: 100%;
    }

    /* 2 Columns on Mobile - Classic Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px; /* Tighter gap for mobile */
    }

    .product-card {
        border-radius: 8px; /* Slightly less rounded on small screens */
    }

    .product-info {
        padding: 0.8rem;
    }

    .product-title {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .btn-view {
        font-size: 0.75rem;
        padding: 0.5rem 0;
    }
}

.category-filter-mobile {
    padding: 10px 0 20px 0;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: block;
}

    .category-filter-mobile::-webkit-scrollbar {
        display: none;
    }

.category-pill {
    display: inline-block;
    padding: 8px 20px;
    margin-right: 10px;
    border-radius: 50px;
    background-color: white;
    border: 1px solid #e0e0e0;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .category-pill.active {
        background-color: #1a1a1a;
        color: white;
        border-color: #1a1a1a;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }

.category-sidebar {
    display: none;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

    .category-link:hover {
        background-color: #f8f9fa;
        color: #1a1a1a;
        transform: translateX(5px);
    }

    .category-link.active {
        background-color: #f0f0f0;
        color: #1a1a1a;
        font-weight: 700;
        border-color: #e0e0e0;
        border-left: 4px solid #1a1a1a;
    }

.cat-count {
    font-size: 0.8rem;
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
    color: #777;
}

.category-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.category-list::-webkit-scrollbar {
    width: 6px;
}

.category-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.category-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (min-width: 992px) {
    .category-filter-mobile {
        display: none;
    }

    .category-sidebar {
        display: block;
        position: sticky;
        top: 100px;
    }
}
