/* ==========================================================================
   Ibtisam Enterprise - Main Public Stylesheet
   ========================================================================== */

:root {
    --primary-color: #0f2b48;
    --primary-hover: #163e66;
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --secondary-color: #475569;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
    background-color: #ffffff;
    line-height: 1.6;
}

/* --- Top Header Bar --- */
.top-bar {
    background-color: var(--dark-bg);
    color: #94a3b8;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}
.top-bar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}
.top-bar a:hover {
    color: #ffffff;
}

/* --- Main Navigation --- */
.navbar-custom {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 0.85rem 0;
    transition: var(--transition);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
}
.navbar-brand span {
    color: var(--accent-color);
}
.nav-link {
    font-weight: 500;
    color: #334155 !important;
    margin: 0 0.25rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 0.375rem;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--accent-color) !important;
    background-color: #f1f5f9;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, #0f2b48 0%, #1e3a5f 50%, #0284c7 100%);
    color: #ffffff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.25) 0%, transparent 50%);
    pointer-events: none;
}
.hero-title {
    font-weight: 800;
    font-size: 2.75rem;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: #e2e8f0;
    font-weight: 300;
}

/* --- Category Cards --- */
.category-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-color: var(--accent-color);
}
.category-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.6rem;
    background: #e0f2fe;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Product Cards --- */
.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hover-shadow);
    border-color: #cbd5e1;
}
.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect ratio */
    background-color: #f8fafc;
    overflow: hidden;
}
.product-img-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: var(--transition);
}
.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}
.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(15, 43, 72, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 0.375rem;
}
.product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.product-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
.product-title a:hover {
    color: var(--accent-color);
}
.product-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: auto;
    padding-top: 0.75rem;
}
.price-call {
    color: #0d9488;
    font-size: 1rem;
}

/* --- Product Details Page --- */
.product-main-img-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.product-main-img-box img {
    max-height: 420px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}
.thumb-gallery {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.thumb-item {
    width: 70px;
    height: 70px;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    background: #f8fafc;
    transition: var(--transition);
}
.thumb-item.active, .thumb-item:hover {
    border-color: var(--accent-color);
}
.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.spec-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.spec-table th {
    background-color: #f1f5f9;
    color: var(--primary-color);
    font-weight: 600;
    width: 35%;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.spec-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}
.spec-table tr:last-child th, .spec-table tr:last-child td {
    border-bottom: none;
}

/* --- Footer --- */
.footer-main {
    background-color: var(--dark-bg);
    color: #94a3b8;
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 1px solid #1e293b;
}
.footer-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: #ffffff;
    padding-left: 0.25rem;
}

/* --- Custom Modal Lightbox --- */
.lightbox-modal .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: none;
}
.lightbox-modal img {
    max-height: 80vh;
    object-fit: contain;
}

/* --- Search & Filter Bar --- */
.filter-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}
.btn-primary-custom:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
}
.btn-outline-custom {
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition);
}
.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.dropdown-submenu {
  position: relative;
}
.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
}
.dropdown-submenu:hover .dropdown-menu {
  display: block;
}