/* ============================================
   style.css – PremiumShop Complete Stylesheet
   Includes: Global, Components, Pages, Responsive
   ============================================ */

/* ----- CSS Variables ----- */
:root {
    --primary: #2c7be0;
    --primary-dark: #1a5bbf;
    --secondary: #2c3e50;
    --accent: #ff5e7c;
    --light-bg: #f8f9fa;
    --border-color: rgba(0,0,0,0.05);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.02);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 30px -10px rgba(0,0,0,0.08);
    --shadow-xl: 0 25px 40px -12px rgba(0,0,0,0.15);
    --transition-base: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1e2a3a;
    background: #ffffff;
    margin: 0;
    padding: 0;
}
a { text-decoration: none; }
img { max-width: 100%; }

/* ===== Page Loader ===== */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
}
#page-loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-content { text-align: center; }
.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loader-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 1px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Toast Message (used in JS) ===== */
.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: fadeInOut 2s ease forwards;
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* ===== Top Utility Bar ===== */
.top-utility-bar {
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}
.top-utility-bar a {
    color: #5b6877;
    transition: color 0.2s;
}
.top-utility-bar a:hover {
    color: var(--primary);
}

/* ===== Navbar ===== */
.navbar {
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    color: var(--secondary);
}
.navbar .btn-link {
    color: var(--secondary);
    position: relative;
}
.navbar .btn-link:hover {
    color: var(--primary);
}
.cart-badge, .wishlist-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
}
.search-form .input-group {
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: var(--transition-base);
}
.search-form:focus-within .input-group {
    box-shadow: 0 4px 20px rgba(44,123,224,0.2);
    transform: scale(1.02);
}
.search-form .form-control,
.search-form .form-select {
    border: 1px solid #e0e0e0;
    border-right: none;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
}
.search-form .form-select {
    background-color: var(--light-bg);
    font-weight: 500;
    color: var(--secondary);
    border-radius: 40px 0 0 40px;
}
.search-form .btn {
    border-radius: 0 40px 40px 0;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-weight: 500;
    transition: var(--transition-base);
}
.search-form .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #004085);
    transform: translateY(-1px);
}
.search-form .btn i {
    transition: transform 0.2s;
}
.search-form .btn:hover i {
    transform: scale(1.1);
}

/* ===== Category Navigation ===== */
.category-nav {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.category-nav .nav-link {
    color: var(--secondary);
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    white-space: nowrap;
    transition: color 0.2s;
}
.category-nav .nav-link:hover {
    color: var(--primary);
}
.category-nav .dropdown-menu {
    border: none;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

/* ===== Mini Cart Dropdown ===== */
.mini-cart-dropdown {
    width: 320px;
    padding: 1rem;
}

/* ===== Product Card (Common) ===== */
.product-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}
.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: var(--light-bg);
    overflow: hidden;
}
.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}
.product-wishlist, .quick-view-btn {
    position: absolute;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 2;
    border: none;
    color: var(--secondary);
}
.product-wishlist {
    top: 12px;
    right: 12px;
}
.quick-view-btn {
    top: 12px;
    left: 12px;
}
.product-wishlist:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}
.quick-view-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}
.product-content {
    padding: 1.2rem 1rem 1rem;
}
.product-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #7f8c8d;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}
.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}
.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}
.product-card .btn-outline-primary {
    border-radius: 50px;
    border-width: 1.5px;
    font-weight: 500;
    transition: var(--transition-base);
}
.product-card .btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* Rating inside product card */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.star-rating {
    display: flex;
    align-items: center;
}
.stars-outer {
    position: relative;
    display: inline-block;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 1rem;
    color: #d1d9e6;
}
.stars-outer::before {
    content: "\f005 \f005 \f005 \f005 \f005";
    letter-spacing: 2px;
}
.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #fabf35;
}
.stars-inner::before {
    content: "\f005 \f005 \f005 \f005 \f005";
    letter-spacing: 2px;
}
.rating-value {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.review-count {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-left: 4px;
}

/* ===== Section Headers ===== */
section h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}
section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, var(--light-bg) 100%);
    padding: 4rem 0;
}
.hero-section h1 {
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}
.hero-section .btn-primary {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    border: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}
.hero-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ===== Category Cards ===== */
.category-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1rem;
    transition: var(--transition-base);
    text-align: center;
    height: 100%;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.category-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--light-bg);
    transition: var(--transition-base);
}
.category-card:hover img {
    border-color: var(--primary);
    transform: scale(1.05);
}
.category-card h5 {
    font-weight: 600;
    color: var(--secondary);
}

/* ===== Promotional Banner ===== */
.promo-banner .row {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 20px;
    padding: 4rem 3rem;
    box-shadow: var(--shadow-lg);
}
.promo-banner h2 {
    color: white;
    font-size: 2.5rem;
}
.promo-banner .btn-light {
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-weight: 600;
    transition: var(--transition-base);
}
.promo-banner .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Newsletter ===== */
.newsletter {
    background: linear-gradient(135deg, var(--light-bg), #ffffff);
}
.newsletter input {
    border-radius: 50px 0 0 50px;
    border: 1px solid var(--border-color);
    height: 54px;
}
.newsletter button {
    border-radius: 0 50px 50px 0;
    height: 54px;
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    border: none;
    font-weight: 600;
    transition: var(--transition-base);
}
.newsletter button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #004085);
    transform: translateX(2px);
}
@media (max-width: 576px) {
    .newsletter input, .newsletter button {
        border-radius: 50px;
    }
    .newsletter input {
        margin-bottom: 1rem;
    }
}

/* ===== Tabs (for home and profile) ===== */
.nav-tabs {
    border-bottom: 2px solid rgba(0,0,0,0.05);
}
.nav-tabs .nav-link {
    border: none;
    color: #7f8c8d;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    margin: 0 0.25rem;
    transition: all 0.3s;
    border-radius: 50px;
}
.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(44,123,224,0.05);
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(44,123,224,0.1), rgba(44,62,80,0.05));
    font-weight: 700;
}
.tab-content {
    padding: 1rem 0;
}

/* ===== Product Details Page ===== */
.product-gallery img {
    width: 100%;
    border-radius: 16px;
}
.product-gallery .thumb {
    width: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
}
.product-gallery .thumb:hover,
.product-gallery .thumb.active {
    border-color: var(--primary);
}
.quantity-input {
    width: 80px;
    text-align: center;
}

/* ===== Cart Page ===== */
.cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}
.cart-item img {
    width: 80px;
    border-radius: 8px;
}
.cart-item .btn-outline-danger {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== Wishlist Page ===== */
.wishlist-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}
.wishlist-item img {
    width: 80px;
    border-radius: 8px;
}

/* ===== Checkout Page ===== */
.checkout-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.checkout-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary);
}
.payment-method {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-method:hover {
    background: var(--light-bg);
    border-color: var(--primary);
}
.payment-method.selected {
    border-color: var(--primary);
    background: #f0f7ff;
}
.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.order-summary-total {
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ===== Profile Page ===== */
.profile-sidebar {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-align: center;
    height: 100%;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}
.profile-name {
    font-size: 1.2rem;
    font-weight: 600;
}
.profile-email {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 1.5rem 0;
}
.stat-item {
    text-align: center;
}
.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
}
.stat-label {
    font-size: 0.8rem;
    color: #7f8c8d;
}
.order-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.order-id { font-weight: 600; }
.order-date { font-size: 0.9rem; color: #7f8c8d; }
.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status-delivered { background: #d4edda; color: #155724; }
.status-shipped { background: #cce5ff; color: #004085; }
.status-pending { background: #fff3cd; color: #856404; }
.address-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

/* ===== About Page ===== */
.about-hero {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 4rem 0;
    border-radius: 0 0 50px 50px;
}
.about-hero h1 {
    font-size: 3rem;
    font-weight: 700;
}
.about-section {
    padding: 4rem 0;
}
.team-member {
    text-align: center;
}
.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
}

/* ===== Contact Page ===== */
.contact-info {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
}
.contact-info i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.contact-form input,
.contact-form textarea {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    width: 100%;
}
.contact-form button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    color: white;
    font-weight: 500;
    transition: var(--transition-base);
}
.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Error Pages (404, 403, 500) ===== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.error-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}
.error-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
}
.error-code {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.error-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.error-message {
    color: #5b6877;
    margin-bottom: 2rem;
}
.btn-home {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition-base);
    color: white;
    display: inline-block;
}
.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(44,123,224,0.3);
    color: white;
}

/* ===== Quick View Modal ===== */
.modal-content {
    border-radius: 24px;
    border: none;
}
.modal-header {
    border-bottom: none;
}

/* ===== Product Filter Sidebar ===== */
.filter-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}
.filter-section {
    margin-bottom: 1.5rem;
}
.filter-section h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary);
}
.filter-section .list-unstyled li {
    margin-bottom: 0.5rem;
}
.filter-section .form-check-label {
    color: #5b6877;
    cursor: pointer;
}
.price-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.price-range input {
    width: 80px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.3rem;
    text-align: center;
}
.apply-filter-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    width: 100%;
    transition: var(--transition-base);
}
.apply-filter-btn:hover {
    background: var(--primary-dark);
}

/* ===== Coupon Input ===== */
.coupon-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.coupon-input input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem;
}
.coupon-input button {
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 1rem;
    transition: var(--transition-base);
}
.coupon-input button:hover {
    background: var(--primary);
}

/* ===== Footer ===== */
footer {
    background: var(--secondary);
}
footer a {
    transition: color 0.2s;
}
footer a:hover {
    color: white !important;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    section h2 {
        font-size: 2rem;
    }
}
@media (max-width: 768px) {
    .filter-sidebar {
        margin-bottom: 1rem;
    }
    .about-hero h1 {
        font-size: 2rem;
    }
    .profile-sidebar {
        margin-bottom: 1rem;
    }
}
@media (max-width: 576px) {
    .product-gallery .thumb {
        width: 60px;
    }
    .error-code {
        font-size: 4rem;
    }
}

/* ===== close btn ===== */
.btn-close {
    top: 0px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 2;
    border: none;
    color: black;
}

.btn-close:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

/* Filter sidebar responsive */
@media (max-width: 991px) {
    .filter-sidebar {
        display: none;
    }
    .filter-sidebar.show {
        display: block;
        margin-bottom: 1rem;
    }
}