/* ============================================================================
   DELIVERABLE 7: Theme / Templating Engine
   Default Theme Stylesheet - Bootstrap 5.3 based
   ============================================================================ */

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero-slider {
    position: relative;
    margin: 0;
    padding: 0;
}

.hero-slider .carousel-item {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-slider .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    z-index: 1;
}

.hero-slider .carousel-caption {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    text-align: left;
    bottom: auto;
    padding: 0;
}

.hero-slider .slide-content {
    max-width: 600px;
}

.hero-slider .slide-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    display: inline-block;
}

.hero-slider .slide-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-slider .slide-description {
    color: rgba(255,255,255,0.95);
    font-size: 1.15rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-slider .btn {
    padding: 15px 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-slider .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-slider:hover .carousel-control-prev,
.hero-slider:hover .carousel-control-next {
    opacity: 1;
}

.hero-slider .carousel-control-prev {
    left: 30px;
}

.hero-slider .carousel-control-next {
    right: 30px;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
    background: var(--bs-primary);
}

.hero-slider .carousel-indicators {
    bottom: 30px;
    margin-bottom: 0;
}

.hero-slider .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.hero-slider .carousel-indicators button.active {
    background: #fff;
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-slider .carousel-item {
        height: 450px;
    }
    
    .hero-slider .slide-title {
        font-size: 2.5rem;
    }
    
    .hero-slider .slide-description {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider .carousel-item {
        height: 400px;
    }
    
    .hero-slider .slide-title {
        font-size: 2rem;
    }
    
    .hero-slider .slide-subtitle {
        font-size: 12px;
    }
    
    .hero-slider .carousel-caption {
        text-align: center;
    }
    
    .hero-slider .slide-content {
        max-width: 100%;
    }
    
    .hero-slider .btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-slider .carousel-item {
        height: 350px;
    }
    
    .hero-slider .slide-title {
        font-size: 1.75rem;
    }
    
    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next {
        width: 45px;
        height: 45px;
    }
    
    .hero-slider .carousel-control-prev {
        left: 15px;
    }
    
    .hero-slider .carousel-control-next {
        right: 15px;
    }
}

/* Header */
.site-header {
    background: var(--header-bg, #fff);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar-brand img {
    max-height: 45px;
}

.site-header .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
}

.site-header .nav-link:hover {
    color: var(--bs-primary) !important;
}

/* Search Bar */
.search-form {
    position: relative;
}

.search-form input {
    padding-right: 45px;
    border-radius: 25px;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
}

/* Mini Cart */
.mini-cart {
    position: relative;
}

.mini-cart .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--bs-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-cart-dropdown {
    width: 320px;
    padding: 15px;
}

/* Product Cards */
.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: #f8f9fa;
}

.product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

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

.product-card .product-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-card .product-info {
    padding: 15px;
}

.product-card .product-name {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-name a {
    color: #333;
    text-decoration: none;
}

.product-card .product-name a:hover {
    color: var(--bs-primary);
}

.product-card .product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-primary);
}

.product-card .product-price .old-price {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-card .product-rating {
    margin-bottom: 8px;
}

.product-card .product-rating .star {
    color: #ffc107;
}

/* Category Cards */
.category-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.category-card .category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 15px 15px;
}

.category-card .category-name {
    color: #fff;
    font-weight: 600;
    margin: 0;
}

/* Slider */
.home-slider {
    margin-bottom: 40px;
}

.home-slider .carousel-item img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

/* Sidebar */
.sidebar-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget .widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bs-primary);
}

/* Price Filter */
.price-filter .noUi-connect {
    background: var(--bs-primary);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}

.category-list a:hover {
    color: var(--bs-primary);
}

/* Product Detail */
.product-gallery {
    position: relative;
}

.product-gallery .main-image {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-gallery .main-image img {
    width: 100%;
}

.product-gallery .thumbnails {
    display: flex;
    gap: 10px;
}

.product-gallery .thumb {
    width: 80px;
    height: 80px;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.product-gallery .thumb.active {
    border-color: var(--bs-primary);
}

.product-gallery .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info .product-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.product-info .product-sku {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.product-info .product-price {
    font-size: 1.5rem;
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.product-info .product-price .old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 1.1rem;
    margin-left: 10px;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-selector button {
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-selector input {
    width: 60px;
    height: 38px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Cart Page */
.cart-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.cart-table .product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
}

.cart-summary h5 {
    margin-bottom: 20px;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-summary .summary-total {
    font-size: 1.25rem;
    font-weight: 600;
    border-top: 2px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

/* Checkout */
.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.checkout-steps .step {
    display: flex;
    align-items: center;
    color: #999;
}

.checkout-steps .step.active {
    color: var(--bs-primary);
}

.checkout-steps .step.completed {
    color: var(--bs-success);
}

.checkout-steps .step-number {
    width: 30px;
    height: 30px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: 600;
}

.checkout-steps .step.active .step-number,
.checkout-steps .step.completed .step-number {
    background: currentColor;
    color: #fff;
}

.checkout-steps .step-line {
    width: 50px;
    height: 2px;
    background: #ddd;
    margin: 0 15px;
}

/* Footer */
.site-footer {
    background: var(--footer-bg, #212529);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.site-footer h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer ul li {
    margin-bottom: 10px;
}

.site-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* Breadcrumb */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
}

/* Flash Messages */
.alert-flash {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .home-slider .carousel-item img {
        height: 300px;
    }
    
    .product-card .product-actions {
        opacity: 1;
    }
    
    .site-header .navbar-collapse {
        background: #fff;
        padding: 15px;
        margin-top: 10px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
}
