/**
 * Security Zone Store - Styles
 * الهوية البصرية متوافقة مع موقع الشركة:
 * https://www.securityzone-syria.com/
 * ألوان الهوية:
 * - أزرق داكن رئيسي: #0a2d4a
 * - أزرق متوسط: #0d3b5c
 * - أزرق فاتح: #1565a8
 * - سماوي: #00bcd4
 * - خلفية: #f0f4f8
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f0f4f8;
    direction: rtl;
}

a { text-decoration: none; color: inherit; }

.container { width: 100%; padding: 0 15px; }

/* ========== TOP BAR ========== */
.top-bar {
    background: linear-gradient(135deg, #0a2d4a 0%, #0d3b5c 100%);
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-links { display: flex; gap: 20px; }
.top-links a { color: rgba(255,255,255,0.85); font-size: 12px; transition: color 0.2s; }
.top-links a:hover { color: #00bcd4; }
.top-welcome { font-size: 12px; color: rgba(255,255,255,0.7); }

/* ========== MAIN HEADER ========== */
.main-header {
    background: linear-gradient(135deg, #0a2d4a 0%, #0d3b5c 100%);
    padding: 15px 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Right: Logo + Brand + Social */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-new {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.logo-text-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.logo-brand {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
    letter-spacing: 0.5px;
}
.logo-tagline {
    font-size: 13px;
    color: #00bcd4;
    font-weight: 600;
    white-space: nowrap;
}

/* Social Icons */
.header-social-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 13px;
    color: white;
    transition: all 0.2s;
    flex-shrink: 0;
}
.header-social-icon:hover {
    transform: scale(1.1);
    opacity: 0.85;
}
.header-social-icon.facebook { background: #1877F2; }
.header-social-icon.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* Center: Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}
.header-nav a {
    padding: 10px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.header-nav a:hover,
.header-nav a.active {
    color: #00bcd4;
    border-bottom-color: #00bcd4;
}

/* Left: Contact Info */
.header-contact-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.header-contact-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.header-contact-icon { font-size: 14px; }
.header-contact-value {
    font-weight: 600;
    color: #fff;
}

/* ========== SUB HEADER: Search ========== */
.sub-header {
    background: linear-gradient(135deg, #0d3b5c 0%, #1565a8 100%);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sub-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Categories Dropdown */
.cat-dropdown { position: relative; flex-shrink: 0; }
.cat-dropdown-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}
.cat-dropdown-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: #00bcd4;
}
.cat-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 200;
    min-width: 250px;
    padding: 8px 0;
    margin-top: 5px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.cat-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #333 !important;
    font-size: 13px;
    transition: all 0.15s;
    text-decoration: none !important;
}
.cat-dropdown-menu a:hover {
    background: #f0f7ff;
    color: #00bcd4 !important;
}

/* Search Bar */
.search-bar-wide {
    flex: 1;
    max-width: none;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    overflow: hidden;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.2);
}
.search-cat-select {
    background: rgba(255,255,255,0.1);
    border: none;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding: 0 12px;
    font-size: 13px;
    font-family: inherit;
    color: #fff;
    height: 100%;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
}
.search-bar-wide input {
    flex: 1;
    border: none;
    padding: 0 15px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    height: 100%;
    background: transparent;
    color: #fff;
}
.search-bar-wide input::placeholder { color: rgba(255,255,255,0.6); }
.search-btn {
    background: #00bcd4;
    color: #fff;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    font-size: 16px;
    height: 100%;
    transition: background 0.2s;
}
.search-btn:hover { background: #00a5bb; }

/* Cart Button */
.cart-btn-header {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
    position: relative;
}
.cart-btn-header:hover {
    background: rgba(255,255,255,0.25);
}

/* Affiliate Button */
.affiliate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 10px;
}
.affiliate-btn:hover {
    background: linear-gradient(135deg, #1b5e20, #388e3c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}
.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    margin-right: 2px;
    flex-shrink: 0;
}
.cart-total-header {
    font-weight: 700;
    color: #ffd700;
    font-size: 12px;
    flex-shrink: 0;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== CATEGORIES BAR ========== */
.categories-bar {
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.categories-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.categories-bar a {
    padding: 10px 12px;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    position: relative;
}
.categories-bar a:hover,
.categories-bar a.active {
    color: #00bcd4;
    border-bottom-color: #00bcd4;
    background: rgba(0,188,212,0.05);
}
.categories-bar a.active {
    font-weight: 600;
}

/* ========== MAIN LAYOUT ========== */
.main-layout {
    width: 100%;
    padding: 20px 15px;
    display: flex;
    gap: 15px;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: none;
}
@media (min-width: 1024px) { .sidebar { display: block; } }

.sidebar-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #0a2d4a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00bcd4;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-title svg {
    width: 18px;
    height: 18px;
    fill: #00bcd4;
}
.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 8px; }
.sidebar-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #555;
    font-size: 13px;
    transition: all 0.15s;
}
.sidebar-list a:hover,
.sidebar-list a.active {
    background: rgba(0,188,212,0.08);
    color: #00bcd4;
    font-weight: 600;
}

/* ========== TOOLBAR ========== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}
.toolbar h1 { font-size: 20px; color: #0a2d4a; margin-bottom: 4px; }
.toolbar p { font-size: 12px; color: #888; }
.toolbar-right select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: #555;
    background: white;
    cursor: pointer;
}

/* ========== PRODUCTS GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1400px) { .products-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1800px) { .products-grid { grid-template-columns: repeat(6, 1fr); } }

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: #00bcd4;
}
.product-img {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.4s;
}
.product-card:hover .product-img img {
    transform: scale(1.05);
}
.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}
.badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #00bcd4 0%, #008ba3 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}

.product-info { padding: 15px; }
.product-name {
    display: block;
    font-weight: 600;
    color: #0a2d4a;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    min-height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.product-price {
    font-size: 18px;
    font-weight: 800;
    color: #00bcd4;
}
.product-old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00bcd4 0%, #008ba3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #008ba3 0%, #006f82 100%);
    transform: scale(1.02);
}

/* ========== PRODUCT TOOLTIP ========== */
.product-tooltip {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 10px;
    width: 250px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}
.product-card:hover .product-tooltip {
    opacity: 1;
    visibility: visible;
}
.tooltip-title {
    font-weight: 700;
    font-size: 14px;
    color: #0a2d4a;
    margin-bottom: 8px;
    line-height: 1.4;
}
.tooltip-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}
.tooltip-price {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-weight: 700;
    color: #00bcd4;
    font-size: 14px;
}

/* ========== CART PAGE ========== */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
}
.cart-item-info { flex: 1; }
.cart-item-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #0a2d4a;
    margin-bottom: 5px;
}
.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 4px;
    width: fit-content;
}
.quantity-control button {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: background 0.2s;
}
.quantity-control button:hover { background: #00bcd4; color: white; }
.quantity-control span {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    color: #0a2d4a;
}

.cart-summary {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    margin-top: 20px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
}
.cart-summary-row.total {
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
    color: #0a2d4a;
    padding-top: 15px;
}

/* ========== CHECKOUT PAGE ========== */
.checkout-page {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}
.checkout-page h1 {
    font-size: 24px;
    color: #0a2d4a;
    margin-bottom: 25px;
    text-align: center;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
    color: #222;
}
.form-group select option {
    color: #222 !important;
    background: #ffffff !important;
    padding: 8px 12px;
    font-size: 14px;
}
.form-group select option:disabled {
    color: #888 !important;
    background: #f5f5f5 !important;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 0 3px rgba(0,188,212,0.1);
}
.required { color: #e53935; }

.btn-telegram {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-telegram:hover { background: linear-gradient(135deg, #006699 0%, #004d73 100%); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #00bcd4 0%, #008ba3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    gap: 8px;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #008ba3 0%, #006f82 100%);
    transform: scale(1.02);
}

/* ========== PRODUCT PAGE ========== */
.product-page {
    width: 100%;
    padding: 25px 15px;
}
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
@media (max-width: 767px) { .product-main { grid-template-columns: 1fr; } }

.product-gallery {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    border-radius: 10px;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-gallery img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s;
}
.product-gallery:hover img { transform: scale(1.05); }

.product-title {
    font-size: 22px;
    color: #0a2d4a;
    margin-bottom: 10px;
    line-height: 1.4;
}
.product-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.product-meta span {
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 20px;
}
.price-big {
    font-size: 28px;
    font-weight: 800;
    color: #00bcd4;
    display: block;
    margin: 15px 0;
}
.price-big .old {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    margin-right: 10px;
    font-weight: 400;
}

.product-description {
    color: #555;
    line-height: 1.8;
    margin: 20px 0;
    font-size: 14px;
}
.product-description h3 {
    font-size: 16px;
    color: #0a2d4a;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #00bcd4;
}

.buy-section {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a2d4a 0%, #0d3b5c 50%, #1565a8 100%);
    padding: 20px;
}
.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}
.login-logo svg { margin-bottom: 10px; }
.login-logo h2 { color: #0a2d4a; font-size: 22px; }
.login-logo p { color: #888; font-size: 13px; margin-top: 5px; }

/* ========== ADMIN ========== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0a2d4a 0%, #0d3b5c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.admin-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.admin-sidebar-header .logo { justify-content: center; color: white; margin-bottom: 8px; }
.admin-sidebar-header .role { font-size: 12px; color: rgba(255,255,255,0.6); }

.admin-nav { list-style: none; padding: 15px 0; }
.admin-nav li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}
.admin-nav li a:hover,
.admin-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-right-color: #00bcd4;
}

.admin-sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.15);
}
.admin-sidebar-footer a {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.admin-sidebar-footer a:hover { color: #fff; }
.admin-sidebar-footer a.logout-link { color: #ff6b6b; margin-bottom: 0; }
.admin-sidebar-footer a.logout-link:hover { color: #ff1744; }
.admin-sidebar-footer .icon { margin-left: 5px; }

.admin-main {
    flex: 1;
    margin-right: 260px;
    padding: 25px;
    background: #f0f4f8;
    min-height: 100vh;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}
.admin-header h1 { font-size: 22px; color: #0a2d4a; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card h3 { font-size: 13px; color: #888; margin-bottom: 10px; }
.stat-card .number { font-size: 28px; font-weight: 800; color: #0a2d4a; }

.admin-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 700px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 15px;
}
.upload-area:hover { border-color: #00bcd4; background: #f0f7ff; }
.upload-area img { max-height: 150px; border-radius: 6px; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    border: 1px solid #e8e8e8;
}
.data-table th {
    background: linear-gradient(135deg, #0a2d4a 0%, #0d3b5c 100%);
    color: white;
    padding: 14px 16px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.data-table tr:hover { background: #fafafa; }
.data-table td img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 3px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-inactive { background: #ffebee; color: #c62828; }

.btn-danger {
    background: #ffebee;
    color: #c62828;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.2s;
}
.btn-danger:hover { background: #ffcdd2; }

.btn-edit {
    background: #e3f2fd;
    color: #1565c0;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-edit:hover { background: #bbdefb; }

/* ========== FOOTER ========== */
.footer {
    background: linear-gradient(135deg, #0a2d4a 0%, #0d3b5c 100%);
    color: rgba(255,255,255,0.8);
    margin-top: 50px;
    padding: 40px 0 0;
    border-top: 3px solid #00bcd4;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00bcd4;
    display: inline-block;
}
.footer a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer a:hover { color: #00bcd4; }
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* Footer social icons */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
}
.footer-social a.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    color: white;
    transition: all 0.2s;
}
.footer-social a.footer-social-icon:hover {
    transform: scale(1.1);
    opacity: 0.85;
}
.footer-social a.footer-social-icon.facebook { background: #1877F2; }
.footer-social a.footer-social-icon.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #0a2d4a 0%, #0d3b5c 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.error { background: linear-gradient(135deg, #c62828 0%, #e53935 100%); }

/* ========== BREADCRUMB ========== */
.breadcrumb-bar {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 0;
}
.breadcrumb-bar a { color: #00bcd4; font-size: 13px; }
.breadcrumb-bar span { color: #666; font-size: 13px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .top-links { display: none; }
    .header-nav { display: none; }
    .main-header .container { flex-wrap: wrap; justify-content: center; }
    .header-contact-left { display: none; }
    .header-right-group { flex-direction: column; gap: 10px; }
    .search-bar-wide { max-width: none; }
    .cat-dropdown-btn { padding: 8px 12px; font-size: 12px; }
    .cart-btn-header { padding: 8px 12px; font-size: 12px; }
    .categories-bar a { padding: 10px 14px; font-size: 13px; }
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .admin-sidebar { width: 100%; position: relative; height: auto; }
    .admin-main { margin-right: 0; }
    .product-main { grid-template-columns: 1fr; }
}

/* ========== Unified Document Box Styles ========== */
.upload-area-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    min-height: 60px;
    background: #fafafa;
}
.upload-area-mini:hover {
    border-color: #00bcd4;
    background: #e0f7fa;
}
.doc-box input[type="url"] {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.doc-box input[type="url"]:focus {
    border-color: #00bcd4;
    outline: none;
}

/* ========== RESPONSIVE: Admin multi-column layouts ========== */
@media (max-width: 768px) {
    .admin-form > form > div[style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .admin-form > form > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    #tab-docs > div[style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #0a2d4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #1565a8; }
