/*
 * Premium E-Commerce Enhancements CSS
 * CulturoFit Theme - Professional Design Elements
 */

/* === STICKY HEADER ENHANCEMENTS === */
.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(44, 0, 64, 0.12);
    background: rgba(252, 250, 253, 0.98);
    backdrop-filter: blur(12px);
}

.site-header.header-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

/* === PRODUCT BADGES === */
.product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.badge-sale {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    color: white;
}

.badge-featured {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-stock {
    background: #6b7280;
    color: white;
}

/* === STOCK INDICATOR === */
.stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.75rem 0;
}

.stock-in {
    background: rgba(21, 128, 61, 0.1);
    color: #15803d;
    border: 1px solid rgba(21, 128, 61, 0.2);
}

.stock-low {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

.stock-out {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1); }
}

/* === TRUST BADGES & DELIVERY INFO === */
.delivery-trust-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f6f1fa 0%, #fcfafd 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-item svg {
    flex-shrink: 0;
    color: var(--primary);
}

.trust-item div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.trust-item strong {
    font-size: 0.9rem;
    color: var(--foreground);
    font-weight: 700;
}

.trust-item span {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.payment-methods-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.payment-methods-display > span {
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.payment-icon {
    width: 48px;
    height: 32px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
}

/* === BREADCRUMBS === */
.culturofit-breadcrumbs {
    padding: 1rem 0 0.5rem;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--border);
}

/* === SHOP TOOLBAR === */
.shop-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--secondary);
    padding: 0.25rem;
    border-radius: 0.4rem;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 0.35rem;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: all 0.2s;
    display: grid;
    place-items: center;
}

.view-btn:hover {
    background: rgba(88, 0, 153, 0.1);
    color: var(--primary);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.view-btn svg {
    display: block;
}

/* === LIST VIEW STYLES === */
.products.view-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.products.view-list .product-card {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    grid-template-rows: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.products.view-list .product-media {
    aspect-ratio: 4/5;
    height: 250px;
}

.products.view-list .product-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.products.view-list .product-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0;
}

/* === ENHANCED PRODUCT CARD ANIMATIONS === */
.product-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(44, 0, 64, 0.18);
}

.product-card:hover .product-media img {
    transform: scale(1.08);
}

/* === QUICK VIEW BUTTON === */
.quick-view-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(88, 0, 153, 0.4);
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
    background: var(--accent);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(110, 68, 255, 0.5);
}

/* === LOADING STATES === */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 400px;
}

.skeleton-text {
    height: 20px;
    margin-bottom: 0.5rem;
}

/* === TOAST NOTIFICATIONS === */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 25px rgba(44, 0, 64, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

.toast-notification.success {
    border-left: 4px solid #15803d;
}

.toast-notification.error {
    border-left: 4px solid #dc2626;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .delivery-trust-section {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .trust-item {
        padding: 0.5rem;
    }
    
    .products.view-list .product-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .products.view-list .product-media {
        height: 300px;
    }
    
    .shop-toolbar {
        padding: 0.75rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
        gap: 0.35rem;
    }
    
    .payment-methods-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .product-badges {
        top: 0.35rem;
        left: 0.35rem;
        gap: 0.25rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
    
    .stock-indicator {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .quick-view-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* === SCROLL TO TOP BUTTON === */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(88, 0, 153, 0.4);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
    z-index: 999;
    display: grid;
    place-items: center;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-to-top:hover {
    background: var(--accent);
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 6px 16px rgba(110, 68, 255, 0.5);
}

/* === ENHANCED BUTTONS === */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* === IMAGE LAZY LOADING === */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
