/* ================================================
   PRODUCT PAGE OPTIMIZATION - E-COMMERCE BEST PRACTICES
   ================================================ */

/* Optimized Product Gallery */
.product-gallery .main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #f8f9fa;
}

.product-gallery .main-image-container:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.product-gallery .thumbnail-btn {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-gallery .thumbnail-btn:hover {
    border-color: var(--bs-primary);
    transform: scale(1.05);
}

.product-gallery .thumbnail-btn.border-primary {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.1);
}

/* Compact Product Info Layout */
.product-info-compact .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 1rem;
}

.product-info-compact .h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.product-info-compact .h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Quantity Input */
.quantity-input {
    border: none;
    background: transparent;
    font-weight: 600;
}

.quantity-input:focus {
    box-shadow: none;
    background: white;
    border-radius: 0.25rem;
}

/* Expandable Content */
.expandable-section .collapse {
    transition: all 0.3s ease;
}

.expandable-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.expandable-toggle i {
    transition: transform 0.2s ease;
}

/* Compact Related Products */
.related-products-compact .product-card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.related-products-compact .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-products-compact img {
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .product-gallery .main-image-container {
        margin-bottom: 1rem;
    }

    .product-gallery .main-image-container img {
        height: 250px;
    }

    .thumbnail-btn {
        width: 45px !important;
        height: 45px !important;
    }

    .product-info-compact .h3 {
        font-size: 1.25rem;
    }

    .related-products-compact .row {
        margin: 0 -0.25rem;
    }

    .related-products-compact .col {
        padding: 0 0.25rem;
    }
}

/* Stock Status Indicators */
.stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stock-indicator.in-stock {
    color: #198754;
}

.stock-indicator.out-of-stock {
    color: #dc3545;
}

.stock-indicator::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Trust Signals */
.trust-signals {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.trust-signals i {
    font-size: 1rem;
}

/* Price Display Optimization */
.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.price-old {
    font-size: 1rem;
    color: #6c757d;
    text-decoration: line-through;
}

.price-savings {
    font-size: 0.875rem;
    color: #198754;
    font-weight: 600;
}

/* ================================================
   EXISTING STYLES (PRESERVED)
   ================================================ */

/* Product Cards - Compact Style */
.product-card-compact {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.product-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.product-card-compact .card-img-top {
    transition: transform 0.3s ease;
}

.product-card-compact:hover .card-img-top {
    transform: scale(1.05);
}

.product-card-compact .card-title a {
    font-size: 0.85rem;
    font-weight: 500;
}

.product-card-compact .btn {
    border-radius: 20px;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.product-card-compact .badge {
    font-size: 0.65rem;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .product-card-compact .card-body {
        padding: 0.75rem !important;
    }

    .product-card-compact .card-title a {
        font-size: 0.8rem;
    }
}

/* Color Variables - Your Brand Colors */
:root {
    /* Primary Brand Colors */
    --brand-primary: #1b4332;
    --brand-secondary: #40916c;
    --brand-accent: #f77f00;
    --brand-muted: #f0f4f1;
    --text-color: #1f2d3d;
    --border-radius: 16px;

    /* Footer & Admin Colors */
    --footer-dark: #1e3a5f;
    --footer-darker: #0a1929;
    --footer-accent: #00b4d8;
    --footer-accent-hover: #90e0ef;

    /* Oasis Compatibility - Map to your colors */
    --color-1st: #1b4332;
    --primary-color: #1b4332;
    --color-2nd: #40916c;
    --secondary-color: #40916c;
}

/* Custom Product Card Enhancements */
.ps-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Custom Button Styles */
.btn-custom-primary {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background: var(--brand-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.3);
}

/* Footer Adjustments */
.footer {
    background: linear-gradient(135deg, var(--footer-darker) 0%, var(--footer-dark) 100%);
    color: white;
}

.footer a {
    color: var(--footer-accent-hover);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--footer-accent);
}

/* Mobile Responsiveness Tweaks */
@media (max-width: 768px) {
    .ps-product {
        margin-bottom: 1rem;
    }

    .hero-banner {
        padding: 2rem 1rem;
    }

    .hero-slideshow {
        max-width: 200px !important;
        max-height: 180px !important;
        margin: 1rem auto 0 !important;
    }

    .hero-slide {
        height: 180px !important;
    }

    .hero-banner .col-12 {
        order: 1;
    }

    .hero-banner .text-center {
        order: 2;
    }
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-secondary);
}

/* ================================================
   NEW REDESIGN STYLES
   ================================================ */

/* Modern Category Card */
.category-card-modern {
    display: block;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-decoration: none;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.category-card-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--brand-secondary);
}

.category-card__image-wrapper {
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.category-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.category-card-modern:hover .category-card__image {
    transform: scale(1.05);
}

.category-card__content {
    padding: 0.9rem;
    text-align: center;
    background: #fff;
}

.category-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.category-card__count {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Product Detail Page */
.product-carousel .carousel-item {
    background: #fff;
    position: relative;
}

.product-carousel .carousel-control-prev,
.product-carousel .carousel-control-next {
    width: 8%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-carousel:hover .carousel-control-prev,
.product-carousel:hover .carousel-control-next {
    opacity: 0.8;
}

.product-carousel .carousel-control-prev-icon,
.product-carousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 1.2rem;
    background-size: 40%;
}

.product-carousel .carousel-indicators {
    margin-bottom: -2rem;
    z-index: 10;
}

.product-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.product-carousel .carousel-indicators button.active {
    background-color: #fff;
}

.carousel-caption {
    bottom: 1rem;
    left: 1rem;
    right: auto;
    text-align: left;
    padding: 0;
}

.carousel-caption h5 {
    font-size: 0.9rem;
    margin: 0;
    display: inline-block;
}

/* Product Card Link Fixes */
.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card a:hover {
    color: var(--brand-primary);
}

/* Contact Form Enhancements */
.contact-form {
    position: relative;
}

.contact-form .form-label {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-form .form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.contact-form .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-1px);
}

.contact-form .form-control:hover:not(:focus) {
    border-color: #adb5bd;
}

/* Enhanced validation feedback */
.contact-form .invalid-feedback {
    display: block;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.contact-form .form-control.is-invalid {
    border-color: #dc3545 !important;
}

.contact-form .form-control.is-valid {
    border-color: #198754 !important;
}

/* Button enhancements */
.contact-form .btn {
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.contact-form .btn:active {
    transform: translateY(0);
}

/* ================================================
   HERO SLIDESHOW
   ================================================ */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 200px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}