/**
 * COMPONENTS STYLES - Aadya Global Exim
 * Reusable UI Components
 * UPDATED: Fixed image cropping issues
 */

/* ========================================
   1. TOP BAR (Contact Info)
======================================== */

.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    font-size: 0.9rem;
}

.topbar-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    min-height: 60px;
}

.topbar-left {
    justify-self: start;
    display: flex;
}

.topbar-center {
    justify-self: center;
    display: flex;
}

.topbar-right {
    justify-self: end;
    display: flex;
}

.top-bar-logo {
    height: 120px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

.certification-badges {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ===============================
   CERTIFICATION BADGES – PROMINENT
================================ */

.badge-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}



.badge-img:hover {
    opacity: 1;
}

.contact-info {
    display: flex;
    gap: 25px;
    align-items: center;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 500;
}

.contact-info i {
    font-size: 1.1rem;
}

/* Responsive Top Bar - Mobile First */
@media (max-width: 767px) {
    .top-bar {
        padding: 10px 0;
    }
    
    .topbar-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
        text-align: center;
        min-height: auto;
    }
    
    .topbar-left,
    .topbar-center,
    .topbar-right {
        justify-self: center;
        width: 100%;
    }
    
    .top-bar-logo {
        height: 60px;
        max-width: 150px;
    }
    
    .certification-badges {
        justify-content: center;
        gap: 10px;
    }
    
    .badge-img {
        height: 30px;
        max-width: 60px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 8px;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .topbar-grid {
        gap: 15px;
    }
    
    .top-bar-logo {
        height: 80px;
        max-width: 180px;
    }
    
    .badge-img {
        height: 40px;
        max-width: 80px;
    }
    
    .contact-info {
        gap: 15px;
    }
    
    .contact-info span {
        font-size: 0.85rem;
    }
}

/* ========================================
   2. NAVIGATION
======================================== */

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 60px;
}

.brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.navbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.5px;
}

.navbar-title span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Menu */
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.navbar-menu li {
    position: relative;
}

.navbar-menu a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 0;
    transition: color 0.3s;
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: #667eea;
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

/* Dropdown Menu */
.navbar-menu .dropdown {
    position: relative;
}

.navbar-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 12px 0;
    min-width: 220px;
    margin-top: 8px;
}

.navbar-menu .dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 24px;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #667eea;
    padding-left: 30px;
}

.dropdown-menu a::after {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1a1a1a;
    cursor: pointer;
    padding: 8px;
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        padding: 20px;
        gap: 0;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu li {
        border-bottom: 1px solid #eee;
    }
    
    .navbar-menu li:last-child {
        border-bottom: none;
    }
    
    .navbar-menu a {
        display: block;
        padding: 15px 0;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        margin-top: 0;
    }
}

/* ========================================
   3. FOOTER
======================================== */

.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

/* Responsive footer grid */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-section h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 600;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    padding-left: 8px;
}

.footer-links a i {
    font-size: 0.9rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.8);
}

.contact-item i {
    font-size: 1.2rem;
    color: #667eea;
    margin-top: 2px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255,255,255,0.7);
}

/* ========================================
   4. BREADCRUMBS
======================================== */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 8px;
    color: #999;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* ========================================
   5. PRODUCT CARDS - FIXED IMAGE DISPLAY
======================================== */

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* FIXED: Changed from cover to contain for full image display */
.product-img {
    width: 100%;
    height: 250px;
    object-fit: contain; /* Changed from cover */
    background: #f8f9fa; /* Added background for padding */
    padding: 10px; /* Added padding */
    transition: transform 0.5s;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

/* ========================================
   6. CATEGORY CARDS - FIXED IMAGE DISPLAY
======================================== */

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* FIXED: Changed from cover to contain for full image display */
.category-img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* Changed from cover */
    background: #f8f9fa; /* Added background */
    padding: 10px; /* Added padding */
}

.category-content {
    padding: 24px;
    text-align: center;
}

.category-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.category-content p {
    color: #666;
    margin-bottom: 20px;
}

/* ========================================
   7. PAGE HEADER
======================================== */

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.page-header p {
    color: rgba(255,255,255,0.95);
    font-size: 1.1rem;
}

.page-header .breadcrumb {
    justify-content: center;
    margin-bottom: 24px;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item::before {
    color: rgba(255,255,255,0.8);
}

.page-header .breadcrumb-item a {
    color: white;
}

/* ========================================
   8. FEATURE BOXES
======================================== */

.feature-box {
    text-align: center;
    padding: 40px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.feature-box h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-box p {
    color: #666;
    line-height: 1.6;
}

/* ========================================
   9. RESPONSIVE ADJUSTMENTS
======================================== */

@media (max-width: 768px) {
    .topbar-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .topbar-left,
    .topbar-center,
    .topbar-right {
        justify-self: center;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .product-card,
    .category-card {
        margin-bottom: 20px;
    }
}

/* =====================================================
   GLOBAL CARD IMAGE STANDARD (NON-PRODUCT PAGES ONLY)
   Safe additive rule – does NOT affect product detail
===================================================== */

.global-card-img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 12px;
    display: block;
}
/* FORCE override page-level cropping */
.product-card img.global-card-img,
.category-card-home img.global-card-img {
    object-fit: contain !important;
}

/* =====================================================
   ART GALLERY EFFECT – FULL PREVIEW + HOVER EXPAND
   Applies to index preview & gallery page
===================================================== */

.gallery-item {
    overflow: hidden;
    background-color: #f8f9fa;
}

/* PREVIEW STATE – full image, no cut */
.gallery-item img.global-card-img {
    width: 100%;
    height: 250px;              /* index preview height */
    object-fit: contain;        /* FULL image visible */
    padding: 14px;
    transition: transform 0.6s ease, object-fit 0.3s ease;
    transform-origin: center;
}

/* FULL GALLERY PAGE can be taller */
.gallery-section .gallery-item img.global-card-img {
    height: 300px;
}

/* HOVER STATE – artistic zoom */
.gallery-item:hover img.global-card-img {
    object-fit: cover;          /* allow cinematic crop */
    padding: 0;
    transform: scale(1.15);
}

/* =========================================
   FORCE REMOVE WHITE BACKGROUND – CERT BADGES
   (Actual parent containers)
========================================= */

.top-bar img.badge-img {
    background: transparent !important;
}

/* Kill white tiles on ALL possible parents */
.top-bar .topbar-left > div,
.top-bar .topbar-left > a,
.top-bar .topbar-left .d-flex > div,
.top-bar .topbar-left .align-items-center > div {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ===============================
   NAV BRAND – MULTICOLOR TITLE
================================ */

.navbar .brand-title {
    display: flex;
    align-items: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}

.navbar .brand-main {
    color: #667eea; /* purple-blue */
    margin-right: 4px;
}

.navbar .brand-sub {
    color: #764ba2; /* deeper purple */
}
