/**
 * OKYON Auto Parts E-commerce
 * Main Stylesheet
 * Version: 1.1
 * Updated: November 2025
 */

/* ============================================================================
   TABLE OF CONTENTS
   ============================================================================
   1. CSS Variables
   2. Base Styles
   3. Header Styles
   4. Navigation Styles
   5. App Download Section
   6. Home Page Styles
   7. Product Card Styles
   8. Product Detail Page Styles
   9. Footer Styles
   10. Responsive Styles
   11. Utilities
   ============================================================================ */

/* ============================================================================
   1. CSS VARIABLES
   ============================================================================ */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* ============================================================================
   2. BASE STYLES
   ============================================================================ */
* {
    font-family: 'Mitr', sans-serif;
}

body {
    background-color: #f5f5f5;
    padding-top: 20px;
}

/* ============================================================================
   3. HEADER STYLES
   ============================================================================ */
.logo img {
    max-width: 100%;
    height: auto;
    padding: 10px;
}

.header-top {
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ============================================================================
   4. NAVIGATION STYLES
   ============================================================================ */
.navbar {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 15px;
}

.nav-search-wrapper {
    width: 100%;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 400;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.navbar-nav .nav-link:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

.navbar-nav .nav-link i {
    margin-right: 5px;
}

/* Mobile Search Styles */
.mobile-search {
    flex: 0 0 auto;
}

.mobile-search form {
    gap: 5px;
}

.mobile-search .form-control {
    width: 150px;
    border-radius: 20px 0 0 20px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.mobile-search .btn {
    border-radius: 0 20px 20px 0;
    padding: 0.375rem 0.75rem;
}

/* Desktop Search Styles */
.desktop-search form {
    gap: 0;
    min-width: 250px;
}

.desktop-search .form-control {
    border-radius: 20px 0 0 20px;
    border-right: none;
}

.desktop-search .btn {
    border-radius: 0 20px 20px 0;
}

/* ============================================================================
   5. APP DOWNLOAD SECTION
   ============================================================================ */
.app-download {
    background: var(--gradient-primary);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

.app-download a {
    display: inline-block;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.app-download a:hover {
    transform: scale(1.05);
}

.app-download img {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
}

/* ============================================================================
   6. HOME PAGE STYLES
   ============================================================================ */

/* Carousel Styles */
.carousel-fade .carousel-item {
    transition: opacity 0.8s ease-in-out;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .carousel-item-next:not(.carousel-item-start),
.carousel-fade .active.carousel-item-end {
    opacity: 0;
}

#heroCarousel {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

/* Section Headers */
.section-header {
    margin: 40px 0 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0d6efd;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
}

.section-header i {
    font-size: 2rem;
    color: #0d6efd;
}
/* ============================================================================
   7. PRODUCT CARD STYLES
   ============================================================================ */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s ease;
}

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

.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;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.btn-view {
    background: #fff;
    color: #333;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #0d6efd;
    color: #fff;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
    height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #0d6efd;
}

.product-price {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #28a745;
    font-weight: bold;
}

.price-label {
    color: #666;
    font-size: 0.75rem;
    font-weight: 400;
}

.price-value {
    font-size: 1rem;
}

.product-info .btn {
    margin-top: auto;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.product-info .btn-primary {
    background-color: #dc3545;
    border-color: #dc3545;
}

.product-info .btn-primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.product-info .btn i.fa-shopping-cart {
    margin-right: 5px;
}
/* ============================================================================
   8. PRODUCT DETAIL PAGE STYLES
   ============================================================================ */
.product-detail-page {
    padding: 30px 0;
}

.product-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: #f8f9fa;
    padding: 20px;
}

.product-image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.product-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.product-info-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: 100%;
}

.product-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.product-code {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 15px;
}

.product-code i {
    color: #667eea;
    margin-right: 8px;
}

.product-detail-page .product-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #28a745;
    margin: 20px 0;
}

.product-detail-page .product-price small {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 400;
}

.stock-status {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin: 20px 0;
    display: inline-block;
}

.stock-status.in-stock {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stock-status i {
    margin-right: 8px;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-order {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-order:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-contact {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 15px 40px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.btn-contact:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.social-share {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.social-share h5 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.social-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.social-btn-facebook {
    background: #1877f2;
    color: white;
}

.social-btn-facebook:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
}

.social-btn-line {
    background: #06c755;
    color: white;
}

.social-btn-line:hover {
    background: #05b04c;
    color: white;
    transform: translateY(-2px);
}

.social-btn-copy {
    background: #6c757d;
    color: white;
}

.social-btn-copy:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-2px);
}

.product-details-section {
    margin-top: 40px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-details-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.product-description {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

/* ============================================================================
   9. FOOTER STYLES
   ============================================================================ */
.footer-section {
    background: var(--gradient-secondary);
    color: #fff;
    margin-top: 60px;
    position: relative;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-top {
    padding: 60px 0 30px;
}

.footer-widget h5.footer-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h5.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #667eea;
}

.footer-description {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links a i {
    margin-right: 8px;
    color: #667eea;
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: rgba(255,255,255,0.8);
}

.footer-contact li i {
    margin-right: 12px;
    color: #667eea;
    font-size: 1.1rem;
    margin-top: 3px;
}

.footer-contact a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.payment-methods {
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 25px 0;
    margin-bottom: 30px;
}

.payment-title {
    color: #fff;
    font-weight: 500;
    margin: 0;
}

.payment-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-icons img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.payment-icons img:hover {
    opacity: 1;
}

.payment-text {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.payment-text i {
    color: #667eea;
}

.footer-bottom {
    padding: 20px 0;
}

.copyright-text {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-links-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-links-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-links-bottom .separator {
    color: rgba(255,255,255,0.3);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #764ba2;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: #fff;
}

/* ============================================================================
   10. RESPONSIVE STYLES
   ============================================================================ */
@media (max-width: 768px) {
    body {
        padding-top: 10px;
    }
    
    .header-top {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .logo img {
        max-width: 120px;
        padding: 5px;
    }
    
    .navbar {
        padding: 8px 12px;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    .mobile-search {
        margin-left: 10px;
    }
    
    .navbar-collapse {
        background-color: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        margin-top: 10px;
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .app-download {
        padding: 15px;
        margin-top: 15px;
    }
    
    .app-download h5 {
        font-size: 1rem;
        margin-bottom: 15px !important;
    }
    
    .app-download a {
        display: block;
        margin: 10px auto;
    }
    
    .app-download img {
        max-width: 130px;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .product-title {
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    /* Product Detail Page Mobile */
    .product-detail-page .product-title {
        font-size: 1.5rem;
    }
    
    .product-detail-page .product-price {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-order,
    .btn-contact {
        width: 100%;
    }
    
    .product-badge {
        top: 15px;
        right: 15px;
        font-size: 0.8rem;
        padding: 6px 15px;
    }
    
    /* Footer Mobile */
    .footer-top {
        padding: 40px 0 20px;
    }
    
    .footer-widget {
        margin-bottom: 20px;
    }
    
    .payment-icons {
        justify-content: center;
    }
    
    .footer-links-bottom {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .mobile-search .form-control {
        width: 180px;
    }
}

/* ============================================================================
   11. UTILITIES
   ============================================================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

.rounded-lg {
    border-radius: 15px !important;
}

.rounded-xl {
    border-radius: 20px !important;
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   END OF STYLESHEET
   ============================================================================ */
