/* --- Premium Product Ecosystem Styles --- */
:root {
    --card-bg: #ffffff;
    --accent-gold: #c5a059;
    --accent-blue: #4a90e2;
    --text-muted: #6b7280;
    --text-dark: #111827;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hero Section */
.products-hero-enhanced {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1516733725897-1aa73b87c8e8?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
    color: white;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 4rem;
}

.products-hero-enhanced h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.products-hero-enhanced p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Layout Container */
.products-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Sidebar Styling */
.pp-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 2.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pet Type Selector */
.pet-type-pill {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.type-pill-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.type-pill-item:hover {
    background: #f9fafb;
    border-color: var(--primary);
}

.type-pill-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Price Range */
.pp-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    outline: none;
    margin: 1.5rem 0;
}

.pp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pp-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pp-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Product Cards */
.pp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.pp-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pp-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.pp-card-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: #fcfcfc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.pp-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.pp-card:hover .pp-card-img img {
    transform: scale(1.08);
}

.pp-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.badge-sale {
    background: #fee2e2;
    color: #ef4444;
}

.pp-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pp-card-brand {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.pp-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.pp-card-title a {
    color: inherit;
    text-decoration: none;
}

.pp-card-footer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.pp-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pp-btn-buy-now {
    background: var(--text-dark);
    color: white !important;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pp-btn-buy-now:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.pp-price {
    display: flex;
    flex-direction: column;
}

.pp-price-current {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.pp-price-old {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.pp-btn-view {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pp-btn-view:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

/* Product Detail Page */
.pp-detail-container {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 1.2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.pp-gallery-wrap {
    position: sticky;
    top: 120px;
}

.pp-main-image {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.pp-main-image img {
    max-width: 100%;
    height: auto;
}

.pp-info-wrap {
    display: flex;
    flex-direction: column;
}

.pp-breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pp-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.pp-breadcrumb a:hover {
    color: var(--primary);
}

.pp-detail-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.pp-detail-brand {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.pp-rating-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.pp-stars {
    color: #fbbf24;
}

.pp-price-box {
    background: #f9fafb;
    padding: 2.5rem;
    border-radius: 24px;
    margin-bottom: 3rem;
}

.pp-price-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.pp-price-large {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-dark);
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.pp-savings-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #ecfdf5;
    color: #059669;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.pp-buy-btn {
    background: var(--primary);
    color: white !important;
    padding: 1.5rem 3rem;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(81, 59, 91, 0.2);
    transition: all 0.3s ease;
}

.pp-buy-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(81, 59, 91, 0.3);
}

.pp-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.trust-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.trust-icon {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.trust-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Tabs */
.pp-tabs-container {
    margin-top: 6rem;
}

.pp-tabs-nav {
    display: flex;
    gap: 3rem;
    border-bottom: 1px solid var(--border-light);
}

.pp-tab-link {
    padding: 1.5rem 0;
    font-weight: 800;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    font-size: 1.125rem;
}

.pp-tab-link.active {
    color: var(--primary);
}

.pp-tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.pp-tab-content {
    padding: 4rem 0;
    display: none;
}

.pp-tab-content.active {
    display: block;
    animation: pp-fade-in 0.4s ease;
}

@keyframes pp-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spec-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.spec-item {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.spec-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.spec-value {
    font-weight: 700;
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .pp-sidebar {
        display: none;
        /* Mobile filters will be triggered by button */
    }

    .pp-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pp-gallery-wrap {
        position: relative;
        top: 0;
    }

    .pp-detail-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .pp-price-large {
        font-size: 2.5rem;
    }

    .pp-buy-btn {
        width: 100%;
    }

    .pp-stars {
        font-size: 0.875rem;
    }
}

.mobile-filter-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 2rem;
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-drawer.active {
    transform: translateY(0);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.drawer-overlay.active {
    display: block;
}