﻿/* ===============================
   Root Colors
================================= */
:root {
    --primary: #ff7a00; /* Main Brand Color */
    --primary-dark: #dc6b00; /* Darker Shade */
}

/* ===============================
   Global Styles
================================= */
body {
    background: #F0FBFC;
}


/* Base header */
.header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.3s ease;
}

/* Search bar */
.search-bar-wrapper {
    display: flex;
    gap: 0.5rem;
}

    .search-bar-wrapper input {
        height: 36px;
        font-size: 0.9rem;
    }

    .search-bar-wrapper button {
        height: 36px;
        width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50px;
        transition: transform 0.2s;
    }

        .search-bar-wrapper button:hover {
            transform: scale(1.05);
        }

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 1060;
    display: none;
    align-items: flex-start;
    padding-top: 1rem;
}

    .mobile-search-overlay.show {
        display: flex;
    }

.mobile-search-container {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 50px;
    padding: 0.25rem 0.5rem;
}


/* Cart badge */
.nav-link .badge {
    font-size: 0.65rem;
    padding: 0.35em 0.55em;
}

/* ===============================
   Offcanvas & Mobile Menu
================================= */
.offcanvas {
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
    z-index: 1050 !important;
}

    .offcanvas.show {
        transform: translateX(0);
    }

.offcanvas-backdrop {
    background: rgba(0,0,0,0.4);
    z-index: 1040 !important;
}

@media (min-width: 992px) {
    .mobile-menu-wrapper {
        display: none !important;
        visibility: hidden !important;
    }

    .offcanvas {
        position: static;
        visibility: visible !important;
        transform: none !important;
        border: none;
        width: 260px;
    }
}


/* Responsive */
@media (max-width: 991px) {
    .search-bar-wrapper {
        display: none; /* hide desktop search on tablet/mobile */
    }
}


/* ===============================
   Hero Section & Animations
================================= */
.hero-section {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        background-attachment: scroll !important;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .hero-graphic {
        display: none !important;
    }
}

/* Animations */
@keyframes fadeInOverlay {
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}



/* ===============================
   Footer
================================= */
.footer {
    background: linear-gradient(180deg, #212529, #1a1a1a);
}

/* ===============================
   Product Cards
================================= */
.product-card {
    transition: all 0.3s ease;
    background: #fff;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-main,
.product-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.product-hover {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(1.05);
}

.product-card:hover .product-main {
    opacity: 0;
    transform: scale(0.95);
}

.product-card:hover .product-hover {
    opacity: 1;
    transform: scale(1);
}

/* Badges */
.badge-discount, .badge-new {
    position: absolute;
    top: 10px;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 1rem;
}

.badge-discount {
    left: 10px;
}

.badge-new {
    right: 10px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

    .quick-actions button {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: transform 0.25s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .quick-actions button:hover {
            transform: scale(1.05);
        }

/* Product Info */
.product-title {
    font-size: 1rem;
    font-weight: 600;
}

.price-discount {
    font-weight: 700;
    font-size: 1rem;
}

.price-original {
    color: #dc3545;
    text-decoration: line-through;
    font-size: 0.85rem;
}

.price-regular {
    color: #0d6efd;
    font-weight: 700;
    font-size: 1rem;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stars i {
    font-size: 0.85rem;
    color: #ffc107;
}

.buy-now-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 106, 0, 0.4);
}

.btn-outline-danger:hover {
    transform: scale(1.03);
}

/* Product Grid */
.product-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Responsive Product Cards */
@media (max-width: 768px) {
    .product-card {
        border-radius: 0.75rem;
    }

    .product-title, .price-discount, .price-regular {
        font-size: 0.95rem;
    }

    .quick-actions button {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .product-card {
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    .quick-actions {
        bottom: 8px;
        right: 8px;
        gap: 0.4rem;
    }

        .quick-actions button {
            width: 34px;
            height: 34px;
        }

    .badge-discount, .badge-new {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

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

/* ===============================
   Sidebar
================================= */
.sidebar {
    background: #ffffff;
    border-radius: 2px;
    width: 235px;
}

    .sidebar .list-group-item {
        cursor: pointer;
    }

        .sidebar .list-group-item.active {
            background-color: var(--primary);
            color: #fff;
            border-color: transparent;
        }

@media (max-width: 991.98px) {
    .sidebar {
        width: 100%;
    }
}

/* ===============================
   Register Page
================================= */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.register-card {
    max-width: 500px;
    width: 100%;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    background: white;
}

.card-header {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.card-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.card-subtitle {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.card-body {
    padding: 2.5rem;
}

.input-group-outline {
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .input-group-outline:focus-within {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25);
    }

.input-group-text {
    background: transparent;
    border: none;
    border-left: 2px solid #e9ecef;
    border-radius: 0 12px 12px 0;
}

.form-label {
    margin-bottom: 0.75rem;
    color: #6c757d;
}

.btn-primary {
    background: linear-gradient(135deg, #FFD200 0%, #FFB100 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(253,160,133,0.4);
    }

    .btn-primary:active {
        transform: scale(0.96);
    }

.alert {
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .card-body, .card-header {
        padding: 1.5rem;
    }
}

/* ===============================
   Admin Sidebar
================================= */
.admin-container .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar a.nav-link.active {
    background-color: rgba(255,255,255,0.15);
    border-radius: .375rem;
}

.sidebar a.nav-link:hover {
    background-color: rgba(255,255,255,0.25);
}

/* ===============================
   Category Grid
================================= */
.category-grid > div {
    padding: 0 !important;
    margin: 0 !important;
}

.category-box {
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.category-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.hover-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

@media (max-width: 576px) {
    .category-box {
        height: 130px;
    }

    .category-img {
        width: 70px;
        height: 70px;
    }
}


/* ===============================
   Product Details (Updated)
================================= */

/* Pointer */
.cursor-pointer {
    cursor: pointer;
}

/* Hover effects */
.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
    transition: box-shadow 0.3s;
}

.hover-lift:hover {
    transform: translateY(-5px);
    transition: transform 0.3s;
}

/* Background */
.bg-gradient {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.wow {
    visibility: hidden;
}

/* ===============================
   PRODUCT IMAGE GALLERY
   Perfect Square + Responsive
================================= */

/* Main product image square */
.product-image,
.product-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1; /* Makes perfect square */
    object-fit: cover; /* Crop nicely */
    border-radius: 20px;
    background-color: #f8f9fa;
}

/* Remove your fixed 500px height fully */
.carousel-item {
    display: flex;
    justify-content: center;
}

/* Thumbnail images (square) */
#thumbnailSlider img {
    width: 60px;
    height: 60px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

/* Desktop thumbnails slightly bigger */
@media (min-width: 768px) {
    #thumbnailSlider img {
        width: 70px;
        height: 70px;
    }
}

/* Related product images */
.product-related-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ===============================
   RESPONSIVE FIX — 50% LAYOUT
================================= */

/* Mobile: product image full width */
@media (max-width: 767px) {
    .col-lg-6 {
        margin-bottom: 20px;
    }
}

/* Desktop: natural 50% width already from Bootstrap (col-lg-6) */



/* Fix carousel controls position for square images */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) brightness(0.2);
    border-radius: 50%;
    padding: 10px;
}



/* ===============================
   Product Details
================================= */
/*.cursor-pointer {
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
    transition: box-shadow 0.3s;
}

.hover-lift:hover {
    transform: translateY(-5px);
    transition: transform 0.3s;
}

.bg-gradient {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.wow {
    visibility: hidden;
}

.product-image, .product-placeholder {
    height: 500px;
}

.product-related-image {
    height: 150px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .product-image {
        height: 500px;
    }

    .product-placeholder {
        height: 500px;
    }
    .product-related-image {
        height: 200px;
    }
}

@media (min-width: 992px) {
    .product-image, .product-placeholder {
        height: 500px;
    }
}*/

/* Thumbnail Scrollbar */
#thumbnailSlider::-webkit-scrollbar {
    height: 4px;
}

#thumbnailSlider::-webkit-scrollbar-track {
    background: transparent;
}

#thumbnailSlider::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 2px;
}

    #thumbnailSlider::-webkit-scrollbar-thumb:hover {
        background-color: #6c757d;
    }

/* ===============================
   Seller Dashboard
================================= */
#sellerSidebar .btn {
    background: none;
    border: none;
    color: #212529;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    width: 100%;
    transition: all 0.25s ease;
}

    #sellerSidebar .btn:hover {
        background-color: #f5f7fa;
    }

#sellerSidebar .nav-link {
    display: block;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

    #sellerSidebar .nav-link:hover {
        background-color: #f5f7fa;
        transform: translateX(3px);
    }

    #sellerSidebar .nav-link.active {
        background-color: #0d6efd;
        color: #fff !important;
    }

        #sellerSidebar .nav-link.active i {
            color: #fff !important;
        }

/* ===============================
   Cart
================================= */
.qty-input {
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
}

.card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }










.fade-in-scale {
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.variant-card {
    transition: all 0.3s ease !important;
    transform: translateY(0);
}

    .variant-card:hover {
        transform: translateY(-10px) scale(1.03);
        box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    }

    .variant-card.selected {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px #667eea !important;
    }

.quantity-selector button {
    width: 40px;
    height: 40px;
}

.animate-price {
    animation: pulsePrice 1.5s infinite;
}

@keyframes pulsePrice {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.text-shadow {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.transition-all {
    transition: all 0.3s ease;
}