/* ============================================
   Chison Iraq — Medical Devices Dashboard
   Custom Styles
   ============================================ */

/* ---------- Root Variables ---------- */
:root {
    --ci-primary: #0d6efd;
    --ci-success: #25d366;
    --ci-dark: #1a1a2e;
    --ci-gray: #f8f9fa;
    --ci-card-radius: 12px;
    --ci-transition: 0.3s ease;
}

/* ---------- Global ---------- */
body {
    background-color: var(--ci-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ---------- Hero Banner ---------- */
.hero-banner {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #084298 100%);
    border-radius: var(--ci-card-radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.25);
}

.hero-inner {
    color: #fff;
}

.hero-logo {
    height: 80px;
    width: auto;
    border-radius: 8px;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.hero-logo-chison {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 1.75rem;
    max-width: 700px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-logo {
        height: 60px;
    }
    .hero-logo-chison {
        height: 36px;
    }
    .hero-title {
        font-size: 1.3rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
}

/* ---------- WhatsApp CTA Card ---------- */
.whatsapp-cta-card {
    border-radius: var(--ci-card-radius);
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
    border: 1px solid #c8e6c9;
}

/* ---------- Navbar ---------- */
.navbar {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    background: linear-gradient(135deg, #0d6efd 0%, #084298 100%) !important;
    border-bottom: 3px solid rgba(255, 255, 255, 0.15);
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.navbar-logo {
    height: 50px;
    width: auto;
    border-radius: 8px;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-logo-chison {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all var(--ci-transition);
    letter-spacing: 0.2px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ---------- Cards ---------- */
.card {
    border-radius: var(--ci-card-radius);
    transition: transform var(--ci-transition), box-shadow var(--ci-transition);
}

.product-card:hover,
.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.stat-card {
    border-radius: var(--ci-card-radius);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ---------- Product Images (1:1 Square) ---------- */
.product-card {
    overflow: hidden;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.product-img-wrapper .placeholder-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

/* ---------- Event Config UI ---------- */
.field-row {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
    transition: box-shadow var(--ci-transition);
}

.field-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.field-row .btn-remove {
    opacity: 0.6;
    transition: opacity var(--ci-transition);
}

.field-row:hover .btn-remove {
    opacity: 1;
}

.options-input {
    display: none;
}

.options-input.visible {
    display: block;
}

/* ---------- WhatsApp Floating Button ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    background-color: var(--ci-success);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform var(--ci-transition), box-shadow var(--ci-transition);
    z-index: 1000;
    text-decoration: none;
}

[dir="ltr"] .whatsapp-float {
    left: auto;
    right: 24px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* ---------- About Page ---------- */
.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-info {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ---------- Footer ---------- */
footer {
    background: var(--ci-primary) !important;
}

footer,
footer * {
    color: #000 !important;
}

footer a {
    color: #000 !important;
}

footer a:hover {
    color: #fff !important;
}

/* ---------- Event Registration Success ---------- */
.alert.event-success {
    font-size: 1.15rem;
    padding: 1rem 1.25rem;
    border-width: 2px;
    box-shadow: 0 0.5rem 1.5rem rgba(25, 135, 84, 0.15);
}

.alert.event-success::before {
    content: "✓ ";
    font-weight: 800;
}

/* ---------- Admin Sidebar ---------- */
.list-group-item.active {
    background-color: var(--ci-primary);
    border-color: var(--ci-primary);
}

.list-group-item-action {
    transition: background var(--ci-transition);
}

/* ---------- Table ---------- */
.table {
    border-radius: var(--ci-card-radius);
    overflow: hidden;
}

/* ---------- Badge ---------- */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--ci-transition);
}

.btn-success {
    background-color: var(--ci-success);
    border-color: var(--ci-success);
}

.btn-success:hover {
    background-color: #1fb855;
    border-color: #1fb855;
}

/* ---------- Form Controls ---------- */
.form-control,
.form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ---------- Document Icons ---------- */
.doc-icon {
    min-width: 50px;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon i {
        font-size: 1.3rem !important;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 16px;
        left: 16px;
    }

    [dir="ltr"] .whatsapp-float {
        left: auto;
        right: 16px;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* ---------- Print ---------- */
@media print {
    .whatsapp-float,
    .navbar,
    footer {
        display: none !important;
    }
}

/* ---------- Product Detail Page ---------- */
.product-detail-img-wrapper {
    background: #fff;
    border: 1px solid #e9ecef;
}

.product-detail-img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    padding: 1rem;
}

.product-detail-title {
    font-size: 2rem;
    color: #1a1a2e;
}

.product-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.product-detail-desc {
    font-size: 1.05rem;
    color: #555;
    white-space: pre-line;
}

/* Make product cards clickable feel */
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
}

.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* ---------- Scrollbar (Webkit) ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
