/* ============================================
   TechlyShop — TechlyMart.bd Clone Design
   ============================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: #fff;
    color: #333;
}
a { text-decoration: none; color: inherit; }

/* === HEADER === */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container-fluid {
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}
.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #333;
    padding: 5px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.header-logo { flex-shrink: 0; }
.header-logo img { height: 40px; }
.header-logo-text { font-size: 1.3rem; font-weight: 800; color: #333; white-space: nowrap; }
.header-logo-text span { color: #e91e63; }

.header-search {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}
.header-search input {
    width: 100%;
    padding: 9px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.header-search input:focus { border-color: #e91e63; }
.header-search-results {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 1050;
    max-height: 350px;
    overflow-y: auto;
    display: none;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.search-result-item:hover { background: #f9f9f9; }
.search-result-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }

.track-btn {
    background: #e91e63;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}
.track-btn:hover { background: #c2185b; }

.header-cart-icon {
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: auto;
}

/* === LAYOUT: SIDEBAR + MAIN === */
.page-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
    overflow: hidden;
    width: 100%;
}

/* Left Sidebar */
.left-sidebar {
    width: 260px;
    min-width: 260px;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
}
.sidebar-nav { list-style: none; padding: 15px 0; }
.sidebar-nav li { }
.sidebar-nav li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-nav li a:hover {
    background: #fce4ec;
    color: #e91e63;
    border-left-color: #e91e63;
}
.sidebar-nav li a.active {
    color: #e91e63;
    font-weight: 600;
    border-left-color: #e91e63;
    background: #fce4ec;
}
.sidebar-nav li a .nav-icon { margin-right: 10px; font-size: 1.1rem; }
.sidebar-nav li a .arrow { font-size: 0.7rem; color: #999; }

/* Sub-categories */
.sidebar-sub { list-style: none; padding: 0; display: none; background: #fafafa; }
.sidebar-sub li a {
    padding: 9px 24px 9px 50px;
    font-size: 0.88rem;
    font-weight: 400;
    color: #666;
}
.sidebar-sub li a:hover { color: #e91e63; background: #fce4ec; }
.sidebar-nav li.open > .sidebar-sub { display: block; }

/* Sidebar collapsed (desktop) */
.left-sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
    padding: 0;
}
.main-content-area {
    transition: all 0.3s ease;
}

/* Main Content Area */
.main-content-area {
    flex: 1;
    padding: 15px 20px;
    background: #fff;
    min-width: 0;
    overflow: hidden;
}

/* === BANNER SLIDER === */
.banner-carousel {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
}
.banner-carousel img {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 500;
    object-fit: cover;
    display: block;
}
.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

/* === PRODUCT SECTION === */
.product-section {
    margin-bottom: 30px;
    max-width: 100%;
    overflow: hidden;
}
.product-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}
.product-section-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}
.product-section-header .view-all {
    color: #1976d2;
    font-size: 0.9rem;
    font-weight: 600;
}
.product-section-header .view-all:hover { text-decoration: underline; }

/* Product Scroll Row */
.product-scroll-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    max-width: 100%;
    width: 100%;
}
.product-scroll-row::-webkit-scrollbar { display: none; }

/* === PRODUCT CARD (TechlyMart Style) === */
.product-card {
    min-width: 180px;
    max-width: 200px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    cursor: pointer;
}
.product-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.product-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s;
}
.product-card:hover .product-card-img img {
    transform: scale(1.05);
}

/* Purple + Button */
.product-add-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #7b1fa2;
    background: #fff;
    color: #7b1fa2;
    font-size: 1.3rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    z-index: 5;
}
.product-add-btn:hover {
    background: #7b1fa2;
    color: #fff;
}
.product-add-btn.added {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.product-card-info {
    padding: 10px 12px;
}
.product-card-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 2.3em;
}
.product-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e91e63;
}
.product-card-price .old {
    font-size: 0.78rem;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 5px;
}
.product-card-discount {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #e91e63;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
}

/* Grid mode for shop page */
.product-grid .product-card {
    min-width: unset;
    max-width: unset;
    width: 100%;
}

/* === FLOATING CART BUTTON === */
.floating-cart {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 1050;
    background: #ffc107;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s;
    min-width: 75px;
}
.floating-cart:hover { transform: scale(1.05); }
.floating-cart-icon { font-size: 1.6rem; color: #333; }
.floating-cart-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}
.floating-cart-text .count { display: block; }
.floating-cart-text .total { display: block; }

@keyframes bounceCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.floating-cart.bounce { animation: bounceCart 0.4s ease; }

/* === CART SIDEBAR DRAWER === */
.cart-drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1060;
    display: none;
}
.cart-drawer-overlay.show { display: block; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: #fff;
    z-index: 1070;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -3px 0 15px rgba(0,0,0,0.1);
}
.cart-drawer.show { right: 0; }
.cart-drawer-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-drawer-header h5 { margin: 0; font-weight: 700; }
.cart-drawer-close {
    background: none; border: none;
    font-size: 1.5rem; cursor: pointer; color: #666;
}
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 15px 20px; }
.cart-drawer-empty { text-align: center; color: #aaa; padding: 40px 0; }
.cart-drawer-empty i { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.cart-drawer-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.cart-drawer-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 10px; }

/* === FOOTER === */
.site-footer {
    background: #1a1a2e;
    color: #b0bec5;
    padding: 45px 0 15px;
    margin-top: 40px;
}
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 15px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }
.site-footer a { color: #90a4ae; font-size: 0.88rem; text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: #fff; }
.footer-desc { font-size: 0.88rem; line-height: 1.6; margin-bottom: 15px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; font-size: 0.88rem; }
.footer-links li i { color: #e91e63; }
.footer-payment .badge { font-size: 0.78rem; padding: 5px 10px; font-weight: 500; }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-right: 6px;
    transition: background 0.2s;
}
.footer-social a:hover { background: #e91e63; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 30px;
    padding-top: 15px;
    text-align: center;
    font-size: 0.82rem;
    color: #78909c;
}

/* === SHOP PAGE === */
.shop-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* === AUTH PAGES === */
.auth-card { border: 1px solid #eee; border-radius: 8px; }

/* === RESPONSIVE === */
@media (max-width: 991px) {
    .left-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        z-index: 1060;
        width: 260px;
        transition: left 0.3s ease;
        box-shadow: 3px 0 15px rgba(0,0,0,0.1);
    }
    .left-sidebar.open { left: 0; }
    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 1055;
        display: none;
    }
    .sidebar-overlay.show { display: block; }
    .main-content-area { padding: 10px 15px; }
    .product-card { min-width: 150px; }
    .cart-drawer { width: 100%; right: -100%; }
    .header-search { max-width: 100%; margin: 0; }
    .header-logo-text { font-size: 1rem; }
}

/* hamburger always visible - like TechlyMart */

/* === ADMIN (keep existing) === */
.admin-sidebar { min-height: 100vh; background: #1a1a2e; width: 250px; position: fixed; top: 0; left: 0; z-index: 100; overflow-y: auto; }
.admin-sidebar .nav-link { color: #8492a6; padding: 10px 20px; font-size: 0.9rem; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,0.05); }
.admin-sidebar .nav-link i { width: 24px; }
.admin-main { margin-left: 250px; min-height: 100vh; background: #f4f6f9; }
.stat-card { border-radius: 10px; border: none; }

@media (max-width: 768px) {
    .admin-sidebar { margin-left: -250px; }
    .admin-sidebar.show { margin-left: 0; }
    .admin-main { margin-left: 0; }
}

@media print {
    .no-print, .left-sidebar, .floating-cart { display: none !important; }
}

/* OTP */
.letter-spacing-3 { letter-spacing: 8px; }
