/**
 * Shop Page Styles - High Converting Design
 * 
 * @package Glogglz
 */

/* ==========================================================================
   SHOP HERO
   ========================================================================== */
.gl-shop-hero {
    background: linear-gradient(135deg, var(--gl-brand) 0%, #FFC800 100%);
    padding: 48px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gl-shop-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.gl-shop-hero__content {
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.gl-shop-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--gl-gray-900);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.gl-shop-hero__subtitle {
    font-size: 1.125rem;
    color: var(--gl-gray-800);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.gl-shop-hero__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 40px;
    position: relative;
    z-index: 1;
}

.gl-shop-hero__trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gl-gray-900);
}

.gl-shop-hero__trust-item svg {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .gl-shop-hero {
        padding: 32px 0 40px;
    }
    
    .gl-shop-hero__trust {
        gap: 16px 24px;
    }
    
    .gl-shop-hero__trust-item {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   COLLECTIONS
   ========================================================================== */
.gl-collection {
    padding: 64px 0;
    border-bottom: 1px solid var(--gl-border-light);
}

.gl-collection:last-of-type {
    border-bottom: none;
}

.gl-collection__header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--gl-brand);
}

.gl-collection__header-content {
    max-width: 700px;
}

.gl-collection__header--with-image {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.gl-collection__header--with-image .gl-collection__header-content {
    max-width: none;
}

.gl-collection__header-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
}

.gl-collection__header-image img {
    width: 100%;
    height: auto;
    display: block;
}

.gl-collection__header--with-image .gl-collection__header-image.gl-collection__header-image--small {
    max-width: 140px;
    align-self: center;
}

.gl-collection__header-image--small img {
    padding: 8px;
}

.gl-collection__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--gl-gray-900);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.gl-collection__brand {
    color: var(--gl-gray-400);
    font-weight: 700;
}

.gl-collection__tagline {
    font-size: 1.125rem;
    color: var(--gl-ocean);
    font-weight: 600;
    margin: 0 0 12px;
}

.gl-collection__desc {
    font-size: 1rem;
    color: var(--gl-gray-600);
    margin: 0 0 20px;
    line-height: 1.6;
}

.gl-collection__features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.gl-collection__feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gl-gray-700);
    background: var(--gl-gray-100);
    padding: 8px 14px;
    border-radius: 8px;
}

.gl-collection__feature svg {
    color: var(--gl-success);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .gl-collection__header--with-image {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .gl-collection__header-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .gl-collection {
        padding: 40px 0;
    }
    
    .gl-collection__header {
        text-align: center;
    }
    
    .gl-collection__header-content {
        margin: 0 auto;
    }
    
    .gl-collection__features {
        justify-content: center;
    }
    
    .gl-collection__feature {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }
}

/* ==========================================================================
   PRODUCTS GRID - 3 COLUMNS
   ========================================================================== */
.gl-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 1024px) {
    .gl-products-grid {
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .gl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 540px) {
    .gl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Homepage: always 2 columns on mobile */
.gl-home .gl-products-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .gl-home .gl-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   PRODUCT CARD - PREMIUM DESIGN
   ========================================================================== */
.gl-product-card {
    position: relative;
    background: var(--gl-white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.gl-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.08);
}

.gl-product-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* Product Image */
.gl-product-card__image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    overflow: hidden;
}

.gl-product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gl-product-card__img--hover {
    opacity: 0;
}

.gl-product-card:hover .gl-product-card__img--main {
    opacity: 0;
    transform: scale(0.95);
}

.gl-product-card:hover .gl-product-card__img--hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Badges */
.gl-product-card__badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
}

.gl-product-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
}

.gl-product-card__badge--sale {
    background: #EF4444;
    color: white;
}

.gl-product-card__badge--soldout {
    background: var(--gl-gray-800);
    color: white;
}

/* Quick View Overlay */
.gl-product-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gl-product-card:hover .gl-product-card__overlay {
    opacity: 1;
}

.gl-product-card__quick-view {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gl-white);
    color: var(--gl-gray-900);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gl-product-card:hover .gl-product-card__quick-view {
    transform: translateY(0);
}

/* Product Content */
.gl-product-card__content {
    padding: 20px 24px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gl-product-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gl-gray-900);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

/* USPs with checkmarks */
.gl-product-card__usps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.gl-product-card__usp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--gl-gray-600);
    font-weight: 600;
}

.gl-product-card__usp svg {
    color: var(--gl-success);
    flex-shrink: 0;
}

/* Price */
.gl-product-card__price {
    margin-top: auto;
}

.gl-product-card__price .price {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gl-gray-900);
}

.gl-product-card__price del {
    color: var(--gl-gray-400);
    font-weight: 500;
    font-size: 1rem;
    margin-right: 8px;
}

.gl-product-card__price ins {
    text-decoration: none;
    color: var(--gl-gray-900);
}

/* Add to Cart Button */
.gl-product-card__actions {
    padding: 0 24px 24px;
}

.gl-product-card__atc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--gl-brand);
    color: var(--gl-gray-900);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gl-product-card__atc:hover {
    background: var(--gl-brand-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.gl-product-card__atc--disabled {
    background: var(--gl-gray-200);
    color: var(--gl-gray-500);
    cursor: not-allowed;
}

.gl-product-card__atc--disabled:hover {
    transform: none;
    box-shadow: none;
}

.gl-product-card__atc.loading {
    pointer-events: none;
}

.gl-product-card__atc.loading span {
    opacity: 0;
}

.gl-product-card__atc.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gl-gray-900);
    border-top-color: transparent;
    border-radius: 50%;
    animation: gl-spin 0.6s linear infinite;
}

/* ==========================================================================
   SHOP CTA
   ========================================================================== */
.gl-shop-cta {
    margin: 64px 0;
    padding: 48px;
    background: linear-gradient(135deg, var(--gl-gray-900) 0%, #1E293B 100%);
    border-radius: 24px;
    text-align: center;
}

.gl-shop-cta__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--gl-white);
    margin: 0 0 12px;
    text-transform: uppercase;
}

.gl-shop-cta__text {
    font-size: 1rem;
    color: var(--gl-gray-300);
    margin: 0 0 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.gl-shop-cta .gl-btn {
    gap: 10px;
}

@media (max-width: 640px) {
    .gl-shop-cta {
        margin: 40px 0;
        padding: 32px 24px;
    }
}

/* ==========================================================================
   FLOATING TRUST BAR
   ========================================================================== */
.gl-shop-trust-bar {
    background: var(--gl-white);
    border-top: 1px solid var(--gl-border-light);
    padding: 16px 0;
    margin-top: 48px;
}

.gl-shop-trust-bar__items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 48px;
}

.gl-shop-trust-bar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gl-gray-700);
}

.gl-shop-trust-bar__item svg {
    color: var(--gl-brand-dark);
}

@media (max-width: 768px) {
    .gl-shop-trust-bar__items {
        gap: 16px 32px;
    }
    
    .gl-shop-trust-bar__item {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes gl-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Staggered animation for product cards */
.gl-products-grid .gl-product-card {
    animation: gl-fade-in-up 0.5s ease forwards;
    opacity: 0;
}

.gl-products-grid .gl-product-card:nth-child(1) { animation-delay: 0.1s; }
.gl-products-grid .gl-product-card:nth-child(2) { animation-delay: 0.2s; }
.gl-products-grid .gl-product-card:nth-child(3) { animation-delay: 0.3s; }
.gl-products-grid .gl-product-card:nth-child(4) { animation-delay: 0.4s; }
.gl-products-grid .gl-product-card:nth-child(5) { animation-delay: 0.5s; }
.gl-products-grid .gl-product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes gl-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

