﻿/* =========================
   Vision Care Store Theme
   ========================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --primary: #0A6EBD;
    --secondary: #00B4A6;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --dark: #102A43;
    --text: #2C3E50;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --border: #E5EAF0;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* عام */
body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
}

a {
    text-decoration: none !important;
}

h1, h2, h3, h4 {
    font-weight: 800;
    color: var(--dark);
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    padding: 14px 0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}

.navbar-brand {
    color: white !important;
    font-size: 24px;
    font-weight: 800;
}

.nav-link {
    color: white !important;
    font-size: 16px;
    font-weight: 700;
    margin: 0 6px;
    padding: 10px 14px !important;
    border-radius: 25px;
    transition: 0.3s;
}

    .nav-link:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-2px);
    }

/* المحتوى */
.body-content {
    background: var(--white);
    margin-top: 25px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Hero */
.hero-section,
.jumbotron {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 70px 25px;
    border-radius: 25px;
    margin-bottom: 35px;
    text-align: center;
    box-shadow: var(--shadow);
}

    .hero-section h1,
    .jumbotron h1 {
        color: white;
        font-size: 48px;
        margin-bottom: 15px;
    }

    .hero-section p,
    .jumbotron p {
        font-size: 20px;
        color: white;
    }

/* Cards */
.thumbnail,
.product-card,
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    transition: 0.3s;
    overflow: hidden;
}

    .thumbnail:hover,
    .product-card:hover,
    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 14px 30px rgba(0,0,0,0.14);
    }

    .thumbnail img,
    .product-img,
    .card-img-top {
        width: 100%;
        height: 190px;
        object-fit: cover;
        border-radius: 15px;
    }

.caption h3,
.product-body h3 {
    font-size: 20px;
    margin-top: 12px;
    color: var(--dark);
}

.product-desc,
.caption p {
    color: #66788A;
    min-height: 45px;
}

.price,
.text-success {
    color: var(--success) !important;
    font-weight: 800;
}

/* Buttons */
.btn {
    border-radius: 25px !important;
    font-weight: 700;
    padding: 8px 18px;
    border: none;
    transition: 0.3s;
}

    .btn:hover {
        transform: translateY(-2px);
    }

.btn-primary {
    background: var(--primary) !important;
    color: white !important;
}

.btn-success {
    background: var(--success) !important;
    color: white !important;
}

.btn-info {
    background: var(--secondary) !important;
    color: white !important;
}

.btn-warning {
    background: var(--warning) !important;
    color: white !important;
}

.btn-danger {
    background: var(--danger) !important;
    color: white !important;
}

.btn-default,
.btn-secondary {
    background: #E9EEF5 !important;
    color: var(--dark) !important;
}

/* Forms */
.form-control {
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 10px 14px;
    box-shadow: none;
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(10,110,189,0.12);
    }

/* Tables */
.table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

    .table th {
        background: var(--dark) !important;
        color: white !important;
        text-align: center;
        padding: 14px !important;
    }

    .table td {
        vertical-align: middle !important;
        padding: 12px !important;
    }

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #F4F8FB;
}

/* Alerts */
.alert {
    border-radius: 15px;
    font-weight: 700;
}

/* Badges / Labels */
.badge,
.label {
    border-radius: 20px;
    padding: 7px 12px;
    font-weight: 700;
}

.label-primary {
    background: var(--primary);
}

.label-warning {
    background: var(--warning);
    color: white;
}

.label-success {
    background: var(--success);
}

.label-danger {
    background: var(--danger);
}

/* Dashboard */
.dashboard-title,
.admin-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark);
}

.dashboard-grid,
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dash-card,
.stat-box {
    color: white;
    padding: 25px 15px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

    .dash-card:hover,
    .stat-box:hover {
        transform: translateY(-6px);
    }

    .dash-card h4,
    .stat-box span {
        color: white;
        font-size: 17px;
    }

    .dash-card h2,
    .stat-box strong {
        color: white;
        font-size: 30px;
        font-weight: 800;
    }

.dash-icon {
    font-size: 38px;
}

.dash-card.blue,
.stat-box:nth-child(1) {
    background: linear-gradient(135deg, #0A6EBD, #084B83);
}

.dash-card.green,
.stat-box:nth-child(2) {
    background: linear-gradient(135deg, #00B4A6, #087F75);
}

.dash-card.orange,
.stat-box:nth-child(3) {
    background: linear-gradient(135deg, #F39C12, #D35400);
}

.dash-card.purple,
.stat-box:nth-child(4) {
    background: linear-gradient(135deg, #6F42C1, #4B2C83);
}

.dash-card.red,
.stat-box:nth-child(5) {
    background: linear-gradient(135deg, #E74C3C, #A93226);
}

/* Invoice */
.invoice-box {
    width: 85%;
    margin: auto;
    padding: 35px;
    border-radius: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: white;
    font-size: 17px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 18px;
    border-radius: 18px;
    margin-top: 30px;
}

    footer p {
        margin: 0;
        color: white;
    }

/* Print */
@media print {
    .navbar,
    footer,
    .no-print,
    .btn {
        display: none !important;
    }

    body {
        background: white;
    }

    .body-content,
    .invoice-box {
        box-shadow: none;
        border: none;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .body-content {
        padding: 15px;
    }

    .hero-section h1,
    .jumbotron h1 {
        font-size: 32px;
    }

    .hero-section,
    .jumbotron {
        padding: 40px 15px;
    }

    .thumbnail,
    .product-card {
        height: auto !important;
    }

    .table {
        font-size: 13px;
    }

    .btn {
        margin-bottom: 5px;
    }
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 18px;
    padding: 15px;
    min-height: 500px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 20px;
    font-weight: 800;
    min-height: 45px;
}

.product-desc {
    min-height: 55px;
    color: #66788A;
}

.product-price {
    color: #2ECC71;
    font-weight: 800;
}

.product-stock {
    color: #666;
}

.cart-form {
    margin-top: 10px;
}

.quantity-box {
    width: 80px;
    display: inline-block;
    margin-bottom: 8px;
}

.admin-actions {
    margin-top: 10px;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}