/* ============================================================
   SalarSurgicals - Custom Styles
   Professional B2B Surgical Instruments Export
   Color: Navy #0F1B2D | Gold #C8963E | Steel #1E293B
   ============================================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section Backgrounds */
.hero-home {
    background: linear-gradient(135deg, rgba(15, 27, 45, 0.92) 0%, rgba(26, 41, 68, 0.88) 50%, rgba(15, 27, 45, 0.95) 100%),
                url('../images/hero/hero-surgical-bg.jpg') center/cover no-repeat;
    min-height: 600px;
}

.hero-products {
    background: linear-gradient(135deg, rgba(15, 27, 45, 0.93) 0%, rgba(30, 58, 95, 0.9) 100%),
                url('../images/hero/hero-products-bg.jpg') center/cover no-repeat;
}

.hero-about {
    background: linear-gradient(135deg, rgba(15, 27, 45, 0.9) 0%, rgba(26, 41, 68, 0.88) 100%),
                url('../images/hero/hero-about-bg.jpg') center/cover no-repeat;
}

.hero-contact {
    background: linear-gradient(135deg, rgba(15, 27, 45, 0.92) 0%, rgba(30, 58, 95, 0.9) 100%),
                url('../images/hero/hero-contact-bg.jpg') center/cover no-repeat;
}

.hero-blog {
    background: linear-gradient(135deg, rgba(15, 27, 45, 0.92) 0%, rgba(30, 58, 95, 0.9) 100%),
                url('../images/hero/hero-blog-bg.jpg') center/cover no-repeat;
}

.hero-custom {
    background: linear-gradient(135deg, rgba(15, 27, 45, 0.9) 0%, rgba(200, 150, 62, 0.15) 100%),
                url('../images/hero/hero-custom-bg.jpg') center/cover no-repeat;
}

.hero-generic {
    background: linear-gradient(135deg, #0F1B2D 0%, #1a2944 100%);
}

/* Hero fallback when no image */
.hero-home, .hero-products, .hero-about, .hero-contact, .hero-blog, .hero-custom {
    background-color: #0F1B2D;
}

/* Product Card Hover */
.product-card {
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 27, 45, 0.12);
}

.product-card .product-image {
    transition: transform 0.5s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Category Card */
.category-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #C8963E;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.category-card:hover::before {
    transform: scaleX(1);
}
.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 27, 45, 0.1);
}

/* Blog Card */
.blog-card {
    transition: all 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15, 27, 45, 0.1);
}

/* Trust Badge Animation */
.trust-badge {
    transition: transform 0.3s ease;
}
.trust-badge:hover {
    transform: translateY(-2px);
}

/* Stats Counter */
.stat-counter {
    background: linear-gradient(135deg, rgba(200, 150, 62, 0.08), rgba(200, 150, 62, 0.03));
    border: 1px solid rgba(200, 150, 62, 0.15);
}

/* Gold Gradient Text */
.gold-text {
    background: linear-gradient(135deg, #C8963E, #e4ae3d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 8px;
    color: #94a3b8;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: #C8963E;
    box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 0.5rem;
}

/* Image Gallery */
.gallery-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}
.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: #C8963E;
}

/* Specification Table */
.spec-table tr:nth-child(even) {
    background: #f8fafc;
}
.spec-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Blog Content Styles */
.blog-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0F1B2D;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(200, 150, 62, 0.2);
}
.blog-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1a2944;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.blog-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: #334155;
}
.blog-content ul, .blog-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: #334155;
}
.blog-content ul li {
    list-style: disc;
}
.blog-content ol li {
    list-style: decimal;
}
.blog-content blockquote {
    border-left: 4px solid #C8963E;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #475569;
}
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.blog-content table th {
    background: #0F1B2D;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}
.blog-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.blog-content table tr:nth-child(even) {
    background: #f8fafc;
}

/* Scroll animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Admin Panel Styles */
.admin-sidebar {
    background: #0F1B2D;
    min-height: 100vh;
}
.admin-sidebar a.active {
    background: rgba(200, 150, 62, 0.15);
    color: #C8963E;
    border-left: 3px solid #C8963E;
}
.admin-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* Rich text editor styles */
.editor-toolbar button {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}
.editor-toolbar button:hover {
    background: #f1f5f9;
    border-color: #C8963E;
}

/* Product image container - show full image without cropping */
.product-img-container {
    background: linear-gradient(135deg, #f8fafc, #f0f3f9);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img-container img {
    object-fit: contain;
    padding: 8px;
    max-width: 100%;
    max-height: 100%;
}

/* Product detail main image */
.product-detail-img {
    background: linear-gradient(135deg, #f8fafc, #f0f3f9);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-detail-img img {
    object-fit: contain;
    padding: 12px;
    max-width: 100%;
    max-height: 100%;
}

/* Thumbnail images - also show full */
.gallery-thumb img {
    object-fit: contain;
    padding: 4px;
    background: #f8fafc;
}

/* Blog image container - keep cover for blog/hero images */
.blog-img-container img {
    object-fit: cover;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
}

/* ============================================================
   Responsive Fixes
   ============================================================ */

/* Mobile - Small screens */
@media (max-width: 480px) {
    .hero-home {
        min-height: 420px;
    }
    .hero-home h1,
    .hero-products h1,
    .hero-about h1,
    .hero-contact h1,
    .hero-blog h1,
    .hero-custom h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    .hero-home p,
    .hero-products p,
    .hero-about p {
        font-size: 0.95rem;
    }
    /* Fix footer links wrapping */
    footer .flex.gap-6 {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        justify-content: center;
    }
    /* Stack product card buttons */
    .product-card .flex.items-center.gap-2 {
        flex-direction: column;
    }
    .product-card .flex.items-center.gap-2 a {
        width: 100%;
    }
}

/* Tablet & below */
@media (max-width: 768px) {
    .hero-home {
        min-height: 480px;
    }
    /* Mobile sidebar - collapsible */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 0.75rem;
        font-weight: 600;
        font-size: 0.875rem;
        color: #0F1B2D;
        cursor: pointer;
        margin-bottom: 1rem;
    }
    .sidebar-content {
        display: none;
    }
    .sidebar-content.active {
        display: block;
    }
    /* Fix footer bottom bar stacking */
    footer .border-t .flex {
        text-align: center;
    }
    /* Product detail CTA buttons - stack on small */
    .product-detail-cta {
        flex-direction: column;
    }
    .product-detail-cta a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Desktop+ */
@media (min-width: 769px) {
    .sidebar-content {
        display: block !important;
    }
}

/* Ensure hero text doesn't overflow */
.hero-home, .hero-products, .hero-about, .hero-contact, .hero-blog, .hero-custom {
    overflow: hidden;
    word-wrap: break-word;
}

/* WhatsApp button - smaller on mobile */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 48px !important;
        height: 48px !important;
        bottom: 16px !important;
        right: 16px !important;
    }
    .whatsapp-float svg {
        width: 24px !important;
        height: 24px !important;
    }
}

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