/* ===================================
   MODERN E-COMMERCE DESIGN SYSTEM
   Online BigPen Kenya - 2025
   =================================== */

:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --primary-light: #e7f1ff;
    --secondary-color: #ffc107;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ===================================
   MODERN PRODUCT CARDS
   =================================== */

.modern-product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.modern-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #3C27F5;
}

.modern-product-card .product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.modern-product-card .product-badge.sale {
    background: var(--danger-color);
}

.modern-product-card .product-badge.new {
    background: var(--success-color);
}

.modern-product-card .product-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.modern-product-card .product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.modern-product-card:hover .product-image-wrapper img {
    transform: scale(1.08);
}

.modern-product-card .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.modern-product-card .product-overlay .quick-action {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.modern-product-card .product-overlay .quick-action:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.modern-product-card .product-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-product-card .product-category {
    font-size: 0.7rem;
    color: #3C27F5;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    font-weight: 600;
}

.modern-product-card .product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.modern-product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--spacing-sm);
}

.modern-product-card .product-rating .stars {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.modern-product-card .product-rating .reviews {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modern-product-card .product-price {
    display: flex;
    align-items: ba10px;
    flex-wrap: wrap;
}

.modern-product-card .current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3C27F5;
}

.modern-product-card .original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.modern-product-card .discount-percent {
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 600;
    background: #ffe0e0;
    padding: 2px 6px;
    border-radius: 4pxrem;
    color: var(--danger-color);
    font-weight: 600;
}

.modern-product-card .product-actions {
    display: flex;
    gap: 0;
    margin-top: auto;
}

.modern-product-card .btn-add-cart {
    background: linear-gradient(135deg, #3C27F5 0%, #3C27F5 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.modern-product-card .btn-add-cart:hover {
    background: linear-gradient(135deg, #002244 0%, #002244 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.4);
}

.modern-product-card .btn-wishlist {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-product-card .btn-wishlist:hover,
.modern-product-card .btn-wishlist.active {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: #fff5f5;
}

/* ===================================
   MODERN CATEGORY CARDS
   =================================== */

.modern-category-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    height: 280px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.modern-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.9) 0%, rgba(0, 86, 179, 0.7) 100%);
    z-index: 1;
    transition: all var(--transition-normal);
}

.modern-category-card:hover::before {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.95) 0%, rgba(0, 86, 179, 0.85) 100%);
}

.modern-category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.modern-category-card .category-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.modern-category-card:hover .category-bg {
    transform: scale(1.1);
}

.modern-category-card .category-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.modern-category-card .category-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.modern-category-card .category-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.modern-category-card .category-count {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.modern-category-card .category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: gap var(--transition-fast);
}

.modern-category-card:hover .category-link {
    gap: 12px;
}

/* ===================================
   MODERN REVIEWS/TESTIMONIALS
   =================================== */

.modern-review-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.modern-review-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 120px;
    color: var(--primary-light);
    font-family: Georgia, serif;
    opacity: 0.3;
    z-index: 0;
}

.modern-review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.modern-review-card .review-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.modern-review-card .reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.modern-review-card .reviewer-info {
    flex-grow: 1;
}

.modern-review-card .reviewer-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.modern-review-card .reviewer-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.modern-review-card .review-rating {
    display: flex;
    gap: 4px;
    color: var(--secondary-color);
    font-size: 1rem;
}

.modern-review-card .review-content {
    position: relative;
    z-index: 1;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.modern-review-card .review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* ===================================
   MODERN TEAM CARDS
   =================================== */

.modern-team-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-align: center;
}

.modern-team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.modern-team-card .team-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
}

.modern-team-card .team-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.modern-team-card:hover .team-image {
    transform: scale(1.1);
}

.modern-team-card .team-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 123, 255, 0.95);
    padding: 12px;
    display: flex;
    justify-content: center;
    gap: 12px;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.modern-team-card:hover .team-social {
    transform: translateY(0);
}

.modern-team-card .team-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.modern-team-card .team-social a:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-4px);
}

.modern-team-card .team-details {
    padding: var(--spacing-lg);
}

.modern-team-card .team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: var(--spacing-xs);
}

.modern-team-card .team-role {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.modern-team-card .team-bio {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.modern-hero {
    background: linear-gradient(135deg, #3C27F5 0%, #3C27F5 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.modern-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

.modern-hero .hero-content {
    position: relative;
    z-index: 1;
}

.modern-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.modern-hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.modern-hero .hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.modern-hero .hero-image {
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===================================
   BUTTONS
   =================================== */

.btn-modern {
    padding: 14px 32px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-modern-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-modern-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn-modern-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-subtitle {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: var(--spacing-md);
}

.section-header .section-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .modern-hero h1 {
        font-size: 2rem;
    }

    .modern-hero p {
        font-size: 1rem;
    }

    .section-header .section-title {
        font-size: 1.75rem;
    }

    .modern-product-card .current-price {
        font-size: 1.25rem;
    }

    .modern-category-card {
        height: 200px;
    }

    .modern-category-card .category-name {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .modern-hero {
        padding: 40px 0;
    }

    .modern-hero h1 {
        font-size: 1.5rem;
    }

    .modern-hero .hero-buttons {
        flex-direction: column;
    }

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

/* ===================================
   LOADING ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   PWA OPTIMIZATIONS
   =================================== */

@media (display-mode: standalone) {
    .modern-hero {
        padding-top: 100px;
        /* Account for status bar */
    }
}

/* Touch-friendly sizing for mobile */
@media (hover: none) and (pointer: coarse) {

    .btn-modern,
    .modern-product-card .btn-add-cart,
    .modern-product-card .btn-wishlist {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===================================
   PRODUCT CAROUSEL STYLES
   =================================== */

.modern-carousel-wrapper {
    position: relative;
    padding: 0 15px;
}

.modern-carousel-wrapper .owl-carousel .owl-item {
    padding: 15px;
}

/* Custom Navigation Arrows */
.modern-carousel-wrapper .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    z-index: 10;
    left: 0;
    right: 0;
}

.modern-carousel-wrapper .owl-nav button {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    color: var(--primary-color) !important;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all var(--transition-fast);
    border: 2px solid var(--primary-light);
    z-index: 100;
}

.modern-carousel-wrapper .owl-nav button:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.15);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-dark);
}

.modern-carousel-wrapper .owl-nav button.owl-prev {
    left: 10px;
}

.modern-carousel-wrapper .owl-nav button.owl-next {
    right: 10px;
}

.modern-carousel-wrapper .owl-nav button span {
    font-size: 26px;
    line-height: 1;
    font-weight: bold;
}

/* Custom Dots */
.modern-carousel-wrapper .owl-dots {
    text-align: center;
    margin-top: 25px;
}

.modern-carousel-wrapper .owl-dots .owl-dot {
    display: inline-block;
    margin: 0 5px;
}

.modern-carousel-wrapper .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    background: var(--border-color);
    display: block;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modern-carousel-wrapper .owl-dots .owl-dot.active span,
.modern-carousel-wrapper .owl-dots .owl-dot:hover span {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* Carousel Item Styling */
.modern-carousel-wrapper .modern-product-card {
    margin: 0;
    height: 100%;
    width: 100%;
}

.modern-carousel-wrapper .owl-item {
    display: flex;
    align-items: stretch;
}

.modern-carousel-wrapper .owl-item .item {
    width: 100%;
    display: flex;
}

.modern-carousel-wrapper .owl-item .item>div {
    width: 100%;
    display: flex;
}

/* Ensure product cards fill carousel items properly */
.modern-carousel-wrapper .modern-product-card .product-image-wrapper {
    width: 100%;
}

.modern-carousel-wrapper .modern-product-card .product-details {
    width: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modern-carousel-wrapper {
        padding: 0 10px;
    }

    .modern-carousel-wrapper .owl-nav button.owl-prev {
        left: 5px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .modern-carousel-wrapper .owl-nav button.owl-next {
        right: 5px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .modern-carousel-wrapper .owl-nav button span {
        font-size: 20px;
    }
}

@media (max-width: 576px) {

    .modern-carousel-wrapper .owl-nav button.owl-prev,
    .modern-carousel-wrapper .owl-nav button.owl-next {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .modern-carousel-wrapper .owl-nav button span {
        font-size: 18px;
    }
}

/* Carousel Animation */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modern-carousel-wrapper .owl-item.active {
    animation: slideInFromRight 0.5s ease-out;
}