/*
 * style.css
 * This file contains global or common styles for your web application.
 */
 @import url('https://fonts.googleapis.com/css2?family=STIX+Two+Text:wght@400..700&display=swap');

/* Define CSS custom properties (variables) for consistent styling */
:root {
    --brand-color: #673de6;
    --brand-green-color : #10B981;
    --brand-color-dark-hover: #552ee0;
    --brand-color-dark-active: #4925ce;
    --brand-color-light-hover: #f3f6ff;
    --light-border: #edeff2;
    --light-background: #F9FAFB;
    --brand-color-shadow-light: rgba(103, 61, 230, 0.25);
    --brand-color-shadow-dark: rgba(103, 61, 230, 0.3);
    --brand-color-shadow-hover: rgba(103, 61, 230, 0.4);
    --primary-text-color: #212529;
    --secondary-text-color: #6B7280;
}

/* General body styling for common layout and font */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
h1 {
    font-style: normal;
    font-weight: 600;
    font-size: 42px;
    line-height: 140%;
}
h2 {
    font-weight: 600;
    font-size: 36px;
    line-height: 140%;
}
h3 {
    font-weight: 600;
    font-size: 30px;
    line-height: 140%;
}
h4 {
    font-weight: 600;
    font-size: 26px;
    line-height: 140%;
}
h5 {
    font-weight: 600;
    font-size: 22px;
    line-height: 140%;
}
h1, h2, h3, h4, h5 {
    font-family: "STIX Two Text", serif;
}
a {
    color: var(--brand-color);
}


/* --- CONSOLIDATED: Unified .navbar rule for a consistent light theme --- */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--light-border);
    --bs-navbar-padding-y: 1rem;
    z-index: 9998;
}
.navbar-brand, .nav-link {
    color: #343a40 !important;
    font-weight: 500;
}
.navbar-brand:hover, .nav-link:hover {
    color: var(--brand-color) !important;
}
.nav-link.circle {
    border: 1px solid var(--light-border);
    text-align: center;
    width: 50px;
    height: 50px;
    border-radius: 48px;
}

/* --- Styles for Header Search & Autocomplete --- */
.navbar-search-container {
    position: relative;
}
.navbar-search {
    width: 450px !important;
    height: 50px;
}
.search-icon-btn {
    border: 1px solid #dee2e6;
    background-color: transparent;
    width: 50px;
    font-size: 1.2em;
    border-radius: 0 12px 12px 0;
}
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1100;
    max-height: 400px;
    overflow-y: auto;
    width: 450px;
}
.autocomplete-results a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #212529;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.autocomplete-results a:hover {
    background-color: #f8f9fa;
}
.autocomplete-results img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
}


/* --- CONSOLIDATED: Unified styles for all pages --- */

/* Centered content containers (for login/register pages) */
.centered-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

/* Styles for login/register container cards */
.auth-card {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}
.auth-card h2 {
    color: var(--brand-color);
    margin-bottom: 30px;
    font-weight: 700;
}

/* Form & Button Styles */
.form-control {
    border-radius: 12px;
    border-color: #e2e5e9;
    padding: 10px 12px;
}
.form-control:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.05rem var(--brand-color-shadow-light);
}
.btn {
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-size: 15px;
}
.btn-brand {
    background-color: white;
    padding: 10px 16px;
    border-color: var(--light-border);
    color: var(--brand-color);
}
.btn-brand:hover {
    background-color: var(--brand-color-light-hover);
    border-color: var(--light-border);
    color: var(--brand-color);
}
.btn-accent-green {
    background: var(--brand-green-color);
    color: #FFFFFF;
    padding: 12px 24px;
}
.btn-accent-green:hover {
    background: #0EA170;
    color: #FFF;
}
.btn-big {
    font-size: 17px;
    padding: 14px 28px;
}

/* Alert & Toast Styles */
.alert {
    border-radius: 12px;
    padding: 16px;
}
.alert-success {
    border-color: #10B981;
    color: var(--primary-text-color);
    background-color: #F3FAF8;
}
.alert-danger {
    color: var(--primary-text-color);
    background: #FAF3F3;
    border-color: #C94336;
}
.toast-container { z-index: 9999; }

/* --- CONSOLIDATED: Single, definitive .product-card rule --- */
.product-card {
    border: 1px solid var(--light-border);
    border-radius: 12px;
    background-color: #fff;
    height: 100%;
    transition: transform 0.2s ease-in-out;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-2px);
}
.product-card .card-img-top {
    height: 220px;
    object-fit: cover;
}
.product-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.product-card .card-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4em;
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.2em;
}
.product-card .price {
    font-size: 1rem;
    font-weight: 500;
    color: #00b090;
    margin-bottom: 0.5rem;
}
.product-card .old-price {
    color: #6c757d !important;
    font-size: 14px;
}
.product-card .quantity-input {
    max-width: 60px;
}


/* Layout Styles */
.account-layout {
    display: flex;
    gap: 1.5rem;
}
.user-sidebar-wrapper {
    flex-basis: 280px;
    flex-shrink: 0;
}
.user-sidebar {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    position: sticky;
    top: 2rem;
}
.user-nav .nav-link {
    color: var(--secondary-text-color) !important;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease-in-out;
}
.user-nav .nav-link:hover {
    background-color: var(--brand-color-light-hover);
    color: var(--brand-color) !important;
}
.user-nav .nav-link.active {
    background-color: var(--brand-color);
    color: white !important;
}
.account-content-wrapper {
    flex-grow: 1;
}
.page-layout {
    display: flex;
    gap: 1.5rem;
}
.filter-sidebar-wrapper {
    flex-basis: 300px;
    flex-shrink: 0;
}
.product-grid-wrapper {
    flex-grow: 1;
}
.filter-sidebar {
    background-color: #fff;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--light-border);
}
.product-filter-bar {
    background-color: #ffffff;
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 16px;
}

/* Category Filter Styles */
.category-filter-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-border);
}
.category-filter-item:last-child {
    border-bottom: none;
}
.parent-category-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.parent-category-label .form-check-label {
    font-weight: 500 !important;
    color: var(--secondary-text-color) !important;
}
.parent-category-label .toggle-icon {
    transition: transform 0.3s ease;
}
.parent-category-label[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}
.subcategory-list {
    padding-left: 1.75rem;
    margin-top: 0.5rem;
}

/* Product Detail Page Styles */
.product-gallery .main-image {
    border-radius: 12px;
    border: 1px solid var(--light-border);
}
.thumbnail-list {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}
.thumbnail-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.thumbnail-item img:hover {
    border-color: #ccc;
}
.thumbnail-item img.active {
    border-color: var(--brand-color);
}
.product-info h2 {
    font-weight: 700;
}
.product-info .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-color);
}
.product-info .old-price {
    font-size: 1.25rem;
}
.product-details .nav-link.active {
    border-color: var(--light-border) var(--light-border) #fff;
    background: var(--brand-color-light-hover);
    color: var(--primary-text-color) !important;
}
.product-details .nav-link {
    color: var(--brand-color) !important;
    padding: 12px 24px;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
}

/* Table and Cart Styles */
.table>:not(caption)>*>* {
    padding: 12px 12px;
    box-shadow: none;
    border: none;
}
.table-striped>tbody>tr:nth-of-type(odd)>* {
    background: var(--brand-color-light-hover);
}
#nav-tabContent {
    border-radius: 0 0 12px 12px;
}
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--light-border);
}
.summary-card {
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
}
.address-card {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.address-card:hover {
    border-color: #ced4da;
}
.address-card.selected {
    border-color: var(--brand-color);
    background-color: #f7f3ff;
}

/* Footer Styles */
.site-footer {
    background-color: #212529;
    color: #adb5bd;
    padding: 3rem 0 1rem 0;
    font-size: 0.9rem;
    margin-top: auto;
}
.site-footer h5 {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.25rem;
}
.site-footer .footer-links {
    list-style: none;
    padding-left: 0;
}
.site-footer .footer-links li {
    margin-bottom: 0.75rem;
}
.site-footer .footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
.site-footer .footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}
.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 1.5rem;
    margin-top: 2rem;
}
.social-icons a {
    color: #adb5bd;
    font-size: 1.25rem;
    margin-right: 1rem;
    transition: color 0.2s ease-in-out;
}
.social-icons a:hover {
    color: var(--brand-color);
}

/* User Dashboard & Status Styles */
.stat-card {
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid var(--light-border);
    padding: 25px;
    text-align: center;
    transition: transform 0.2s ease;
    height:100%;
}
.stat-card .icon {
    font-size: 2rem;
    color: var(--brand-color);
    margin-bottom: 15px;
}
.stat-card .value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}
.stat-card .label {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-top: 5px;
}
.section-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--light-border)
}
.status-badge {
    font-size: 0.8em;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 50rem;
}
.status-pending, .status-order-placed {
    background-color: #ffc107;
    color: #343a40;
}
.status-processing, .status-in-transit, .status-order-confirmed, .status-ready-to-ship {
    background-color: #0dcaf0;
    color: #000;
}
.status-shipped {
    background-color: #0d6efd;
    color: #fff;
}
.status-delivered {
    background-color: #198754;
    color: #fff;
}
.status-cancelled {
    background-color: #dc3545;
    color: #fff;
}
.status-hold {
    background-color: #6c757d;
    color: #fff;
}
/*
New Modern Style CSS
*/
.desk_cat a,
.desk_cat a img {
    border-radius: 16px;
}
.desk_cat a img:hover {
    transform: translateY(-2px);
}
.dskr_alert {
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    margin-bottom: 12px;
}
.carousel-control-prev,
.carousel-control-next {
  width: 48px;
  height: 48px;
  margin-right: 0;
  margin-left: 0;
  border: 1px solid #d6d6d6;
  border-radius: 48px;
  text-align: center;
  top: 45%;
  background: #fff;
}
.carousel-control-prev {
    left: -52px;
}
.carousel-control-prev svg,
.carousel-control-next svg {
    color: var(--primary-text-color);
}
.carousel-control-next {
    right: -52px;
}