/* ================================================
   OwnYourStyle — Main Stylesheet
   ================================================ */

:root {
    --primary:   #1a1a2e;
    --accent:    #e94560;
    --accent2:   #0f3460;
    --light-bg:  #f8f9fa;
    --card-shadow: 0 2px 16px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: #222; background: #fff; }

/* ---- Navbar ---- */
#mainNav {
    background: var(--primary);
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.brand-own   { color: #fff; font-size: 1.4rem; letter-spacing: -1px; }
.brand-your  { color: var(--accent); font-size: 1.4rem; letter-spacing: -1px; }
.brand-style { color: #adb5bd; font-size: 1.4rem; letter-spacing: -1px; }

.search-input {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
    color: #fff;
    border-radius: 20px 0 0 20px;
}
.search-input::placeholder { color: rgba(255,255,255,.5); }
.search-input:focus { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; border-color: var(--accent); }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
    color: #fff;
    padding: 80px 0;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.2; }
.hero .badge-pill { background: var(--accent); border-radius: 50px; padding: 6px 16px; font-size: .85rem; }

/* ---- Product Cards ---- */
.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
    height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.14); }

.product-card .card-img-top {
    height: 260px;
    object-fit: cover;
    background: #f0f0f0;
}
.product-card .img-placeholder {
    height: 260px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
}
.product-card .card-body { padding: 1rem; }
.product-card .product-price { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.product-card .product-sale { text-decoration: line-through; color: #aaa; font-size: .9rem; }
.product-card .seller-badge {
    font-size: .75rem;
    background: var(--light-bg);
    color: #666;
    padding: 2px 8px;
    border-radius: 50px;
}

.size-badge {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: .7rem;
    color: #555;
    margin: 1px;
}

/* ---- Category Pills ---- */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    background: #fff;
    color: #444;
    font-size: .875rem;
    font-weight: 500;
    transition: all .15s;
    text-decoration: none;
    cursor: pointer;
}
.category-pill:hover, .category-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- Seller Shop Header ---- */
.shop-header {
    background: linear-gradient(135deg, var(--primary), var(--accent2));
    color: #fff;
    padding: 48px 0;
}
.shop-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.3);
    object-fit: cover;
}
.shop-avatar-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}

/* ---- Dashboard / Admin ---- */
.sidebar {
    background: var(--primary);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    padding-top: 20px;
    transition: width .3s;
}
.sidebar .sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 10px;
}
.sidebar .nav-link {
    color: rgba(255,255,255,.7);
    padding: 10px 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .15s;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-left: 3px solid var(--accent);
}
.sidebar .nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }

.main-content { margin-left: 250px; padding: 30px; min-height: 100vh; background: var(--light-bg); }

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--accent);
}
.stat-card .stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label  { color: #888; font-size: .875rem; }
.stat-card .stat-icon   { font-size: 2.5rem; color: var(--accent); opacity: .3; }

/* ---- Forms ---- */
.form-label { font-weight: 500; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(233,69,96,.15); }

.size-table th { background: var(--primary); color: #fff; font-weight: 500; font-size: .85rem; }
.size-table input { padding: 4px 8px; font-size: .85rem; }

/* ---- Mannequin ---- */
.mannequin-card svg .fig { transition: filter .2s; }
.mannequin-sz.btn-dark { box-shadow: 0 2px 8px rgba(233,69,96,.3); }

/* Animate value updates */
@keyframes popIn {
    0%   { transform: scale(.8); opacity:.4; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1);  opacity:1; }
}
#mannequinSvg text[id^="val-"] { transition: opacity .15s; }
#mannequinSvg text[id^="val-"].updated { animation: popIn .3s ease; }

/* ---- Product Detail ---- */
.product-gallery img {
    width: 100%; height: 460px;
    object-fit: cover;
    border-radius: 12px;
}
.product-gallery .thumb {
    width: 80px; height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s;
}
.product-gallery .thumb:hover, .product-gallery .thumb.active { border-color: var(--accent); }

.size-selector .size-btn {
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: .875rem;
    transition: all .15s;
}
.size-selector .size-btn:hover, .size-selector .size-btn.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.size-selector .size-btn.out-of-stock {
    opacity: .4; cursor: not-allowed;
    text-decoration: line-through;
}

/* ---- Footer ---- */
.site-footer { background: var(--primary); color: #adb5bd; }
.footer-link { color: #adb5bd; text-decoration: none; transition: color .15s; display: block; margin-bottom: 4px; }
.footer-link:hover { color: #fff; }

/* ---- Status Badges ---- */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.status-approved  { background: #d1fae5; color: #065f46; }
.status-pending   { background: #fef3c7; color: #92400e; }
.status-rejected  { background: #fee2e2; color: #991b1b; }
.status-suspended { background: #f3f4f6; color: #4b5563; }

/* ---- Sidebar toggle button (hidden on desktop) ---- */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1.5rem;
    line-height: 1;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Overlay that closes sidebar on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* ---- Mobile / Tablet sidebar ---- */
@media (max-width: 991px) {
    .sidebar {
        width: 62px;
        overflow: hidden;
        transition: width .22s ease;
        z-index: 1050;
        padding-top: 0;
    }
    .sidebar.expanded { width: 250px; box-shadow: 4px 0 24px rgba(0,0,0,.3); }
    .sidebar-toggle { display: block; }

    /* Icon-only mode: hide text, center icons */
    .sidebar:not(.expanded) .nav-text          { display: none; }
    .sidebar:not(.expanded) .sidebar-brand-text { display: none; }
    .sidebar:not(.expanded) .sidebar-footer-text { display: none; }
    .sidebar:not(.expanded) .sidebar-brand {
        padding: 10px 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .sidebar:not(.expanded) .sidebar-brand img,
    .sidebar:not(.expanded) .sidebar-brand .rounded-circle { margin: 0; }
    .sidebar:not(.expanded) .nav-link {
        justify-content: center;
        padding: 12px 0;
        gap: 0;
    }
    .sidebar:not(.expanded) .nav-link i { width: auto; }
    .sidebar:not(.expanded) .mt-auto { padding: 0; text-align: center; }
    .sidebar:not(.expanded) .mt-auto .nav-link { padding: 10px 0; justify-content: center; }

    .main-content { margin-left: 62px; padding: 16px; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .product-gallery img { height: 280px; }
    .main-content { padding: 12px; }
}
