/* ==============================================
   GENTLEMAN'S PURSUITS SHOP - CSS
   ============================================== */

:root {
    /* Colors - Sage green theme */
    --shop-bg: #14181a;
    --shop-bg-light: #1a2023;
    --shop-bg-lighter: #222a2e;
    --shop-text: #e5e5e5;
    --shop-text-muted: #9ca3a8;
    --shop-primary: #5c8374;
    --shop-primary-dark: #4a6b5c;
    --shop-accent: #6d9785;
    --shop-border: #2d3439;
    --shop-card-bg: #1c2226;
    --shop-overlay: rgba(0, 0, 0, 0.4);

    /* Typography */
    --shop-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shop-font-serif: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --shop-radius: 8px;
    --shop-radius-lg: 12px;
    --shop-container-width: 1280px;
}

/* ==============================================
   GLOBAL SHOP STYLES
   ============================================== */

.shop-page {
    background-color: var(--shop-bg);
    color: var(--shop-text);
    font-family: var(--shop-font-sans);
    line-height: 1.6;
    min-height: 100vh;
}

.shop-container {
    max-width: var(--shop-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================================
   HERO SECTION
   ============================================== */

.shop-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://res.cloudinary.com/gentelmanspursuits/image/upload/f_auto,q_auto/v1768425114/mens-gear_rgptul.jpg');
    background-size: cover;
    background-position: center;
    margin-bottom: 40px;
}

.shop-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(92, 131, 116, 0.7), rgba(20, 24, 26, 0.8));
}

.shop-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 700px;
}

.shop-hero-title {
    font-family: var(--shop-font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.shop-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 32px 0;
}

.shop-hero-btn {
    background-color: var(--shop-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    border: none;
    border-radius: var(--shop-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-hero-btn:hover {
    background-color: var(--shop-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(92, 131, 116, 0.3);
}

/* ==============================================
   HEADER BAR (Search & Saved)
   ============================================== */

.shop-header-bar {
    background-color: var(--shop-bg-light);
    border-bottom: 1px solid var(--shop-border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.shop-header-bar .shop-container {
    display: flex;
    gap: 16px;
    align-items: center;
}

.shop-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 8px;
}

.shop-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--shop-text-muted);
    pointer-events: none;
    z-index: 1;
}

.shop-search-input {
    flex: 1;
    padding: 12px 16px 12px 48px;
    background-color: var(--shop-bg-lighter);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    color: var(--shop-text);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.shop-search-input:focus {
    outline: none;
    border-color: var(--shop-primary);
    box-shadow: 0 0 0 3px rgba(92, 131, 116, 0.1);
}

.shop-search-input::placeholder {
    color: var(--shop-text-muted);
}

.shop-search-btn {
    padding: 12px 24px;
    background-color: var(--shop-primary);
    color: white;
    border: none;
    border-radius: var(--shop-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.shop-search-btn:hover {
    background-color: var(--shop-primary-dark);
}

.shop-saved-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--shop-bg-lighter);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    color: var(--shop-text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

.shop-saved-btn svg {
    width: 20px;
    height: 20px;
}

/* ==============================================
   CATEGORY BAR
   ============================================== */

.shop-category-bar {
    background-color: var(--shop-bg-light);
    border-bottom: 1px solid var(--shop-border);
    padding: 16px 0;
    position: sticky;
    top: 72px;
    z-index: 49;
}

.shop-categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.shop-category-btn {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    color: var(--shop-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: capitalize;
}

.shop-category-btn:hover {
    background-color: var(--shop-bg-lighter);
    border-color: var(--shop-primary);
}

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

/* ==============================================
   MAIN CONTENT & SECTIONS
   ============================================== */

.shop-main {
    min-height: 60vh;
}

.shop-section {
    padding: 60px 0;
}

.shop-section-alt {
    background-color: var(--shop-bg-light);
}

.shop-section-header {
    margin-bottom: 40px;
}

.shop-section-title {
    font-family: var(--shop-font-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--shop-text);
    margin: 0 0 8px 0;
}

.shop-section-subtitle {
    font-size: 1rem;
    color: var(--shop-text-muted);
    margin: 0;
}

/* ==============================================
   PRODUCT GRID
   ============================================== */

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

@media (max-width: 768px) {
    .shop-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
}

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

/* ==============================================
   PRODUCT CARD
   ============================================== */

.shop-product-card {
    background-color: var(--shop-card-bg);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: shopFadeIn 0.5s ease backwards;
}

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

.shop-product-card:hover {
    border-color: var(--shop-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Product Image */
.shop-product-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--shop-bg-lighter);
    overflow: hidden;
}

.shop-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Badges */
.shop-product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.shop-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    width: fit-content;
}

.shop-badge-deal {
    background-color: var(--shop-primary);
    color: white;
}

.shop-badge-featured {
    background-color: var(--shop-bg-lighter);
    color: var(--shop-text);
    border: 1px solid var(--shop-border);
}

/* Save Button */
.shop-save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.shop-save-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.shop-save-btn.saved {
    background-color: var(--shop-primary);
}

.shop-save-btn.saved .shop-heart-icon {
    fill: white;
    stroke: white;
}

.shop-save-btn.saving {
    animation: saveButtonPulse 0.4s ease;
}

@keyframes saveButtonPulse {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.15) rotate(10deg);
    }
    75% {
        transform: scale(1.3) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.shop-heart-icon {
    transition: all 0.3s ease;
}

/* Quick View Overlay */
.shop-product-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-product-card:hover .shop-product-overlay {
    opacity: 1;
}

.shop-quick-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: white;
    color: var(--shop-bg);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--shop-radius);
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-quick-view-btn:hover {
    background-color: var(--shop-primary);
    color: white;
}

/* Product Content */
.shop-product-content {
    padding: 20px;
}

.shop-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shop-product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--shop-text-muted);
}

.shop-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--shop-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.shop-product-rating svg {
    width: 12px;
    height: 12px;
}

.shop-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--shop-text);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.shop-product-name a:hover {
    color: var(--shop-primary);
}

.shop-product-description {
    font-size: 0.875rem;
    color: var(--shop-text-muted);
    margin: 0 0 16px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--shop-border);
}

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

.shop-price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--shop-text);
}

.shop-price-original {
    font-size: 0.875rem;
    color: var(--shop-text-muted);
    text-decoration: line-through;
}

.shop-product-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--shop-text-muted);
    padding: 4px 10px;
    border: 1px solid var(--shop-border);
    border-radius: 4px;
}

/* ==============================================
   SAVED DRAWER
   ============================================== */

.shop-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.shop-drawer.open {
    opacity: 1;
    visibility: visible;
}

.shop-drawer-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.shop-drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background-color: var(--shop-bg-light);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.shop-drawer.open .shop-drawer-content {
    transform: translateX(0);
}

.shop-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--shop-border);
}

.shop-drawer-header h3 {
    font-family: var(--shop-font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--shop-text);
    margin: 0;
}

.shop-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--shop-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.shop-drawer-close:hover {
    background-color: var(--shop-bg-lighter);
    color: var(--shop-text);
}

.shop-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.shop-drawer-empty {
    text-align: center;
    color: var(--shop-text-muted);
    font-size: 1rem;
    margin-top: 60px;
}

.shop-saved-product {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--shop-card-bg);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    margin-bottom: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.shop-saved-product:hover {
    border-color: var(--shop-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(92, 131, 116, 0.2);
}

.shop-saved-product:hover .shop-saved-product-name {
    color: var(--shop-primary);
}

.shop-saved-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--shop-radius);
    flex-shrink: 0;
}

.shop-saved-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-saved-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--shop-text);
    margin: 0;
    transition: color 0.3s ease;
}

.shop-saved-product-brand {
    font-size: 0.75rem;
    color: var(--shop-text-muted);
    text-transform: uppercase;
}

.shop-saved-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--shop-primary);
    margin-top: auto;
}

.shop-saved-remove-btn {
    align-self: flex-start;
    padding: 6px;
    background: none;
    border: none;
    color: var(--shop-text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.shop-saved-remove-btn:hover {
    color: #ff6b6b;
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */

@media (max-width: 768px) {
    .shop-hero {
        height: 50vh;
        min-height: 350px;
    }

    .shop-header-bar .shop-container {
        flex-direction: column;
    }

    .shop-search-wrapper {
        max-width: 100%;
    }

    .shop-saved-btn {
        width: 100%;
        justify-content: center;
    }

    .shop-category-bar {
        top: 140px;
    }

    .shop-section {
        padding: 40px 0;
    }

    .shop-drawer-content {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-hero {
        height: 40vh;
        min-height: 300px;
    }

    .shop-product-content {
        padding: 16px;
    }

    .shop-section-header {
        margin-bottom: 24px;
    }
}
