:root {
    --primary: #800080;
    --primary-light: #9932cc;
    --primary-hover: #660066;
    --accent: #800080;
    --accent-hover: #660066;
    --primary-rgb: 128, 0, 128;
    --bg-light: #f8f9fa;
    --text-muted: #6c757d;
    --border-radius: 12px;
    --star-gold: #f5a623;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
    background-color: #fff;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.15);
}

.brand-text {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
}

.search-form {
    max-width: 400px;
    width: 100%;
}

.navbar .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.navbar .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.navbar .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.navbar .btn-outline-primary:hover,
.filter-tabs .btn-outline-primary.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--primary);
}

.cart-link {
    padding: 0.5rem !important;
}

.cart-badge {
    font-size: 0.65rem;
}

.banner-section {
    width: 100%;
    overflow: hidden;
    max-height: 560px;
}

.banner-image {
    width: 100%;
    height: 560px;
    object-fit: cover;
    display: block;
}

.section-title {
    font-weight: 700;
    color: var(--primary);
}

.product-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.product-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.product-card .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.product-card .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}


.star-rating {
    font-size: 0.95rem;
}

.star-rating .bi-star-fill,
.star-rating .bi-star-half {
    color: var(--star-gold) !important;
}

.star-rating .bi-star {
    color: #ddd !important;
}

/* ── Product Detail Page ── */

.product-detail-page {
    padding-top: 2.5rem !important;
    padding-bottom: 3rem !important;
}

.product-gallery {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.thumbnail-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.thumbnail-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail-img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.thumbnail-img.active {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.main-image-container {
    flex: 1;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.main-product-image {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 8px;
}

.product-info-section {
    padding-left: 0.5rem;
}

.product-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.85rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.product-rating-row .star-rating {
    font-size: 1.1rem;
}

.price-display .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-right: 0.75rem;
    vertical-align: middle;
}

.price-display .sale-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    vertical-align: middle;
}

.product-description {
    line-height: 1.7;
    font-size: 0.95rem;
}

.purchase-form {
    padding-top: 0.5rem;
}

.size-selector .size-btn {
    min-width: 48px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.size-selector .size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
}

.size-selector .btn-check:checked + .size-btn {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.color-selector {
    gap: 0.85rem !important;
}

.color-swatch {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    cursor: pointer;
    padding: 0;
    display: inline-block;
    flex-shrink: 0;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.color-swatch:hover {
    transform: scale(1.08);
    border-color: var(--primary);
}

.color-swatch.active {
    border: 3px solid var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.quantity-input {
    max-width: 110px;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.product-action-buttons {
    margin-top: 0.5rem;
}

.btn-add-to-cart {
    background-color: var(--primary);
    border: 2px solid var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add-to-cart:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.25);
}

.btn-buy-now {
    background-color: #fff;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-buy-now:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.3);
}

/* Reviews section */

.reviews-section {
    border-top: 1px solid #eee;
}

.reviews-heading {
    font-weight: 700;
    color: var(--primary);
}

.review-form-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.review-form-card .review-input {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-form-card .review-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.btn-submit-review {
    background-color: var(--primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit-review:hover {
    background-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.review-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.review-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.review-author {
    color: var(--primary);
}

.review-stars .star-rating {
    font-size: 0.9rem;
}

.review-comment {
    color: #555;
    line-height: 1.6;
}

.review-alert {
    border-radius: var(--border-radius);
    border: none;
}

.no-reviews-msg {
    padding: 2rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.cart-item-img,
.checkout-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-summary {
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

.auth-card {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.status-badge {
    font-size: 0.8rem;
    padding: 0.4em 0.8em;
}

.status-pending { background-color: #ffc107; color: #000; }
.status-confirmed { background-color: #0dcaf0; color: #000; }
.status-paid { background-color: #17a2b8; color: #fff; }
.status-shipped { background-color: #6f42c1; color: #fff; }
.status-delivered { background-color: #28a745; color: #fff; }
.status-cancelled { background-color: #dc3545; color: #fff; }

.tracking-progress {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tracking-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.tracking-step .step-label {
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.tracking-step small {
    font-size: 0.78rem;
    line-height: 1.3;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tracking-step.completed .step-icon,
.tracking-step.active .step-icon {
    background: var(--primary);
    color: #fff;
}

.step-label {
    font-weight: 500;
}

.tracking-step.active .step-label {
    font-weight: 700;
    color: var(--primary);
}

.step-connector {
    width: 2px;
    height: 24px;
    background: #e9ecef;
    margin-left: 17px;
}

.step-connector.completed {
    background: var(--primary);
}

.stat-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
}

.stat-card h2 {
    font-weight: 700;
    color: var(--primary);
}

.about-content p,
.about-content li {
    line-height: 1.8;
    color: #555;
}

.footer a:hover {
    color: #fff !important;
}

/* Site Footer */
.site-footer {
    background: #0f0f0f;
    color: #ccc;
    padding: 60px 0 30px;
}

.footer-col {
    animation: footerFadeIn 0.6s ease both;
}

.footer-col:nth-child(1) { animation-delay: 0.05s; }
.footer-col:nth-child(2) { animation-delay: 0.15s; }
.footer-col:nth-child(3) { animation-delay: 0.25s; }
.footer-col:nth-child(4) { animation-delay: 0.35s; }

@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-tagline {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-brand {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-brand:hover {
    color: var(--primary-light) !important;
}

.footer-heading {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-links a:hover {
    color: var(--primary-light) !important;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    color: #ccc;
    line-height: 1.5;
}

.footer-contact i {
    color: var(--primary-light);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.footer-social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #ccc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.footer-social-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

.footer-social-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 4px 14px rgba(225, 48, 108, 0.35);
}

.footer-social-facebook:hover {
    background: #1877f2;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

.footer-social-twitter:hover {
    background: #000;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.footer-social-pinterest:hover {
    background: #e60023;
    box-shadow: 0 4px 14px rgba(230, 0, 35, 0.35);
}

.footer-social-youtube:hover {
    background: #ff0000;
    box-shadow: 0 4px 14px rgba(255, 0, 0, 0.35);
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: #888;
    font-size: 0.875rem;
}

.footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 500;
}

.footer-payment-badge i {
    font-size: 0.85rem;
    color: #ccc;
}

@media (max-width: 768px) {
    .banner-image {
        height: 360px;
    }

    .search-form {
        max-width: 100%;
    }

    /* Product gallery: stack main image above, thumbnails below horizontally */
    .product-gallery {
        flex-direction: column;
    }

    .thumbnail-column {
        flex-direction: row;
        flex-wrap: wrap;
        order: 2;
        justify-content: center;
        margin-top: 0.75rem;
    }

    .main-image-container {
        order: 1;
        width: 100%;
    }

    .thumbnail-img {
        width: 64px;
        height: 64px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .price-display .sale-price {
        font-size: 1.65rem;
    }

    .product-action-buttons {
        flex-direction: column;
    }

    .btn-add-to-cart,
    .btn-buy-now {
        width: 100%;
    }
}
