/* ============================================================
   Thursday Communication Ltd eShop - Main Stylesheet
   ============================================================ */

/* --- CSS Variables / Custom Properties --- */
:root {
    --primary: #1a237e;
    --primary-dark: #0d47a1;
    --primary-light: #3949ab;
    --gold: #ffd700;
    --gold-dark: #daa520;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #f8f9fa;
    --white: #ffffff;
    --body-bg: #f4f6f9;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.15);
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --transition: all 0.3s ease;
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Utility Classes --- */
.text-gold {
    color: var(--gold) !important;
}

.bg-gold {
    background-color: var(--gold) !important;
    color: var(--dark) !important;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--dark);
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-gold:hover,
.btn-gold:focus {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.section-header h6 {
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.min-vh-60 {
    min-height: 60vh;
}

/* --- Top Bar --- */
.top-bar {
    background: var(--primary);
    color: var(--white);
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.top-bar-text {
    opacity: 0.9;
}

.top-bar a:hover {
    opacity: 1;
    color: var(--gold) !important;
}

/* --- Navigation --- */
.main-navbar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.main-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.main-navbar .brand-text {
    color: var(--gold);
    margin-left: 0.5rem;
}

.main-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: var(--gold) !important;
    background: rgba(255, 255, 255, 0.1);
}

.search-form {
    max-width: 400px;
    width: 100%;
}

.search-form .search-input {
    border-radius: var(--radius) 0 0 var(--radius);
    border: 2px solid transparent;
}

.search-form .search-input:focus {
    border-color: var(--gold);
    box-shadow: none;
}

.search-form .search-btn {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-whatsapp {
    font-weight: 600;
    padding: 0.4rem 1rem;
}

/* --- Dropdown --- */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
}

.dropdown-item {
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-light);
    color: var(--primary);
}

/* --- Flash Messages --- */
.flash-message {
    border-radius: 0;
    margin-bottom: 0;
    border: none;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
}

.hero-slide {
    padding: 4rem 0;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-title {
    line-height: 1.2;
}

.hero-desc {
    max-width: 600px;
}

.floating {
    animation: float 3s ease-in-out infinite;
}

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

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

/* --- Trust Badges --- */
.trust-item {
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
}

.trust-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* --- Category Cards --- */
.category-card {
    transition: var(--transition);
    border-radius: var(--radius);
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card .category-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    border-radius: 50%;
    margin: 0 auto;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: var(--white) !important;
}

.category-card:hover .category-icon i {
    color: var(--white) !important;
}

/* --- Product Cards --- */
.product-card {
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.product-badges .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
}

.product-image {
    position: relative;
    overflow: hidden;
    background: var(--white);
    padding: 1rem;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 180px;
    object-fit: contain;
    transition: var(--transition);
}

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

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    transition: var(--transition);
    opacity: 0;
}

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

.product-actions .btn {
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product-title {
    font-size: 0.9rem;
    line-height: 1.3;
}

.product-title a:hover {
    color: var(--primary) !important;
}

.product-price {
    font-size: 1.1rem;
}

.product-old-price {
    font-size: 0.85rem;
}

/* --- Testimonial Cards --- */
.testimonial-card {
    border-radius: var(--radius);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-text {
    font-style: italic;
    line-height: 1.7;
}

/* --- Newsletter Section --- */
.newsletter-form .form-control {
    border: 2px solid transparent;
}

.newsletter-form .form-control:focus {
    border-color: var(--gold);
    box-shadow: none;
}

/* --- Promo Banner --- */
.promo-banner {
    position: relative;
    overflow: hidden;
}

/* --- Page Header --- */
.page-header {
    position: relative;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* --- Shop / Filter Sidebar --- */
.filter-sidebar {
    position: sticky;
    top: 90px;
}

.filter-card {
    border-radius: var(--radius);
}

.filter-list {
    max-height: 250px;
    overflow-y: auto;
}

.filter-list::-webkit-scrollbar {
    width: 4px;
}

.filter-list::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

.filter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    color: var(--dark);
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-link:hover,
.filter-link.active {
    background: var(--gray-light);
    color: var(--primary);
    font-weight: 500;
}

.shop-toolbar {
    background: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* --- Pagination --- */
.pagination .page-link {
    color: var(--primary);
    border: none;
    margin: 0 2px;
    border-radius: var(--radius) !important;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: var(--white);
}

.pagination .page-link:hover {
    background: var(--gray-light);
    color: var(--primary);
}

/* --- Product Detail --- */
.product-gallery .main-image {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border: 1px solid #eee;
}

.product-gallery .main-image img {
    max-height: 350px;
    object-fit: contain;
}

.thumb-img {
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    height: 80px;
    object-fit: contain;
    padding: 0.5rem;
}

.thumb-img:hover,
.thumb-img.active {
    opacity: 1;
    border-color: var(--primary) !important;
}

.quantity-control .btn {
    border-color: #ddd;
}

.quantity-control .form-control {
    border-color: #ddd;
    font-weight: 600;
}

.quantity-control .form-control:focus {
    box-shadow: none;
    border-color: var(--primary);
}

.product-tabs .nav-tabs .nav-link {
    color: var(--dark);
    font-weight: 500;
    border: none;
    padding: 0.75rem 1.5rem;
}

.product-tabs .nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: transparent;
}

.product-tabs .tab-content {
    min-height: 200px;
}

/* --- Cart Page --- */
.cart-item {
    padding: 0.5rem 0;
}

.cart-summary {
    position: sticky;
    top: 90px;
}

/* --- Checkout --- */
.checkout-content .card {
    border-radius: var(--radius);
}

.payment-methods .form-check {
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}

.payment-methods .form-check:hover {
    border-color: var(--primary);
    background: var(--gray-light);
}

.payment-methods .form-check-input:checked ~ .form-check-label {
    color: var(--primary);
}

.payment-methods .form-check:has(.form-check-input:checked) {
    border-color: var(--primary);
    background: rgba(26, 35, 126, 0.05);
}

/* --- Auth Pages (Login/Register) --- */
.auth-section {
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
}

.auth-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.auth-card .card-body {
    padding: 2.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--gray);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.auth-divider span {
    padding: 0 1rem;
}

/* --- Account / Dashboard --- */
.account-sidebar {
    position: sticky;
    top: 90px;
}

.account-sidebar .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--dark);
    transition: var(--transition);
    border-radius: var(--radius) !important;
    margin-bottom: 4px;
}

.account-sidebar .list-group-item:hover,
.account-sidebar .list-group-item.active {
    background: var(--primary);
    color: var(--white);
}

.account-sidebar .list-group-item i {
    width: 20px;
    margin-right: 0.5rem;
}

/* --- Order Confirmation --- */
.confirmation-icon {
    font-size: 5rem;
    color: var(--success);
}

/* --- Contact Page --- */
.contact-info-item {
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-info-item .icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    border-radius: 50%;
    margin: 0 auto;
    font-size: 1.5rem;
    color: var(--primary);
}

/* --- About Page --- */
.about-section {
    line-height: 1.8;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.value-item {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.value-item .icon {
    font-size: 2.5rem;
    color: var(--primary);
}

/* --- Footer --- */
.site-footer {
    background: #0d1b2a;
    color: rgba(255, 255, 255, 0.8);
}

.footer-title {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.footer-links i {
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

.footer-contact p {
    font-size: 0.9rem;
}

.footer-contact i {
    margin-right: 0.5rem;
}

.social-links .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.1rem;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.social-links .social-link:hover {
    background: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

.social-links .social-link.whatsapp:hover {
    background: #25D366;
    color: var(--white);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
}

/* --- Mobile Action Buttons --- */
.mobile-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    padding: 0.5rem;
    gap: 0.5rem;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-actions .btn {
    flex: 1;
    font-weight: 600;
    border-radius: var(--radius);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1040;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    display: flex;
}

/* --- Star Rating (Review) --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: var(--transition);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--warning);
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .main-navbar .navbar-collapse {
        background: var(--primary);
        padding: 1rem;
        border-radius: var(--radius);
        margin-top: 0.5rem;
    }

    .search-form {
        max-width: 100%;
    }

    .hero-slide {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .filter-sidebar {
        position: static;
    }

    .product-image {
        height: 150px;
    }

    .product-image img {
        max-height: 130px;
    }

    .product-gallery .main-image {
        min-height: 250px;
    }

    .product-gallery .main-image img {
        max-height: 200px;
    }

    .auth-card .card-body {
        padding: 1.5rem;
    }

    .mobile-actions {
        display: flex !important;
    }

    .back-to-top {
        bottom: 75px;
    }
}

@media (max-width: 767.98px) {
    .top-bar {
        display: none;
    }

    .hero-title {
        font-size: 1.6rem !important;
    }

    .product-image {
        height: 130px;
    }

    .product-image img {
        max-height: 110px;
    }

    .product-title {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .cart-item .col-4,
    .cart-item .col-8 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-slide {
        padding: 1.5rem 0;
    }

    .hero-title {
        font-size: 1.3rem !important;
    }

    .product-image {
        height: 110px;
    }

    .product-image img {
        max-height: 90px;
    }
}

/* --- Print Styles --- */
@media print {
    .top-bar,
    .main-navbar,
    .mobile-actions,
    .back-to-top,
    .newsletter-section,
    .site-footer {
        display: none !important;
    }
}
