/* --- Global Styles & Variables --- */
:root {
    --primary-color: #c00000; /* A strong red, often associated with brands like Devki */
    --secondary-color: #002060; /* A deep navy blue for contrast */
    --accent-color: #ffc000; /* A gold/yellow for highlights */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --medium-gray: #e0e0e0;
    --dark-gray: #555;
    --white: #fff;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f8f9fa;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons & Links --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a00000;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #001540;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Header & Navigation --- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
}

.call-btn.mobile-call {
    display: inline-flex; /* Visible on all devices */
    background: var(--primary-color);
    color: white;
    width: auto;
    height: 40px;
    border-radius: 50px;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    animation: pulse 2s infinite;
}

.call-btn.mobile-call::after {
    content: "Call Now";
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 8px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(192, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(192, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(192, 0, 0, 0); }
}

.header-top {
    display: none; /* Hidden as per request */
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.header-top-content {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    align-items: center;
    gap: 8px;
}

.header-top-content a {
    color: var(--white);
    font-weight: 500;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 50px;
}

.logo-text h1, .logo-text .logo-main-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1;
    font-weight: bold;
}

.logo-highlight {
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

.contact-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.contact-btn:hover {
    color: var(--white);
    background-color: #a00000;
}

.cart-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    color: var(--dark-gray);
}

.desktop-cart {
    display: inline-flex; /* Use flex to align icon and count */
    align-items: center;
}

.mobile-cart {
    display: none; /* Hide mobile cart on desktop */
}

.cart-btn:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0, 32, 96, 0.8), rgba(0, 32, 96, 0.8)), url('../images/steel manufacturing.avif') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 100px 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-family: var(--font-primary);
    margin-bottom: 20px;
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* --- Page Hero (for other pages) --- */
.page-hero {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-hero-content h1 {
    font-size: 2.5rem;
    font-family: var(--font-primary);
}

/* --- Sections --- */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    font-family: var(--font-primary);
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Products Section --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.product-icon {
    height: 180px; /* Or any desired fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f0f2f5; /* A light background for the image area */
}

.product-icon a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes the image cover the area, cropping if necessary */
    transition: transform 0.3s ease;
}

.product-card:hover .product-icon img {
    transform: scale(1.05);
}

.product-title {
    font-size: 1.2rem;
    margin: 15px 20px 10px;
    color: var(--secondary-color);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin: 0 20px 15px;
    flex-grow: 1;
}

.product-option {
    margin: 0 20px 10px;
}

.product-option label {
    font-weight: 600;
    margin-right: 10px;
    color: var(--secondary-color);
}

.color-select,
.gauge-select {
    padding: 8px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    width: 60%;
    font-family: inherit;
}

.product-price {
    margin: 0 20px 10px;
    font-weight: bold;
}

.price {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.price-unit {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-left: 5px;
}

.product-actions {
    padding: 10px 20px 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller cards */
}

.product-actions .add-to-cart {
    flex-grow: 1;
}

.product-actions .buy-now {
    flex-grow: 1;
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
}

.quantity-btn, .quantity-input {
    background: none;
    border: none;
    height: 45px;
    text-align: center;
}

.quantity-btn {
    width: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark-gray);
}

.quantity-input {
    width: 40px;
    font-size: 1rem;
    font-weight: bold;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-badge.premium {
    background: var(--secondary-color);
    color: var(--white);
}

.view-more-container {
    text-align: center;
    margin-top: 40px;
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
}

.contact-form .form-row .form-group {
    width: 100%;
}

/* --- Footer --- */
.footer {
    background: var(--secondary-color);
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-col p, .footer-col a {
    color: #ccc;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-logo-container {
    margin-bottom: 20px;
}

.footer-logo-text {
    color: var(--white) !important;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--white);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    padding-left: 0;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- WhatsApp Button --- */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.call-btn.mobile-call:hover {
    background-color: #a00000;
    color: white;
}

.whatsapp-btn i {
    font-size: 2rem;
}

.whatsapp-btn span {
    display: inline;
    margin-left: 8px;
    font-weight: bold;
}

.whatsapp-btn:hover {
    transform: translateY(-5px);
}

.whatsapp-btn:hover span {
    display: inline;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Cart Sidebar --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--white);
    z-index: 1002;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.cart-header h3 {
    color: var(--secondary-color);
}

.cart-close {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding-top: 50px;
    color: var(--dark-gray);
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--medium-gray);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}
.cart-actions .btn {
    flex-grow: 1;
    justify-content: center;
}


/* --- Responsive Styles --- */
@media (max-width: 992px) {
    .nav-menu.active {
        right: 0;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 280px;
        height: 100%;
        background-color: #fff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        gap: 0;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid var(--light-gray);
        width: 100%;
        color: #333;
    }

    .nav-menu .contact-btn {
        background-color: transparent;
        color: var(--primary-color, #007bff);
        border: 1px solid var(--primary-color, #007bff);
        text-align: center;
        margin: 15px 20px;
        width: calc(100% - 40px);
        justify-content: center;
    }

    .mobile-toggle {
        display: block;
        color: #333;
    }

    .mobile-nav-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #ccc;
    }

    .mobile-nav-title {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .mobile-close {
        font-size: 2rem;
        color: #555;
        background: none;
        border: none;
        cursor: pointer;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .desktop-cart {
        display: none; /* Hide the desktop cart button on mobile */
    }

    .mobile-cart {
        display: inline-flex;
        align-items: center;
    }

    .cart-btn.mobile-cart {
        position: static; /* Remove fixed positioning */
        color: #333;
    }

    .header-top-content {
        justify-content: center; /* Center the content on mobile */
        text-align: center;
        font-size: 0.85rem; /* Slightly reduce font size */
    }

    .nav-menu .desktop-cart {
        display: none; /* Explicitly hide the desktop cart button inside the mobile menu */
    }
}

/* Adjustments for small screens to prevent overflow */
@media (max-width: 480px) {
    .logo-text h1, .logo-text .logo-main-text {
        font-size: 0.9rem;
    }
    .logo-subtitle {
        display: none; /* Hide subtitle to save space */
    }
    .logo-img {
        height: 35px;
    }
    .navbar-actions {
        gap: 5px;
    }
    .container {
        padding: 0 10px;
    }
    .call-btn.mobile-call {
        height: 32px;
        padding: 0 10px;
        font-size: 0.9rem;
    }
    .call-btn.mobile-call::after {
        content: "Call";
        margin-left: 5px;
    }
    .whatsapp-btn {
        padding: 8px 15px;
        bottom: 15px;
        right: 15px;
    }
    .whatsapp-btn i {
        font-size: 1.5rem;
    }
}

@media (max-width: 350px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Hide mobile-specific elements on desktop */
@media (min-width: 993px) {
    .mobile-nav-header {
        display: none;
    }
}

.nav-link.active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* --- About Page Specific Styles --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    border: 10px solid var(--white);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    line-height: 0; /* Removes extra space below the image */
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

/* --- Manufacturing Page Specific Styles --- */
.manufacturing-intro-img,
.step-image img,
.quality-image img,
.custom-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.manufacturing-image,
.step-image,
.quality-image,
.custom-image {
    overflow: hidden; /* Ensures image corners respect the border-radius */
    border-radius: var(--border-radius);
    margin-top: 20px;
}

/* --- Responsive Layouts for Manufacturing Sections --- */
.manufacturing-intro,
.quality-content,
.custom-content {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.manufacturing-image,
.quality-image,
.custom-image,
.manufacturing-text,
.quality-text,
.custom-text {
    flex: 1 1 300px; /* Stacks on screens smaller than ~640px */
}

@media (min-width: 992px) {
    .manufacturing-image,
    .quality-image,
    .custom-image {
        flex: 0 0 40%; /* Fixed 40% width on desktop */
    }
    .manufacturing-text,
    .quality-text,
    .custom-text {
        flex: 1; /* Takes remaining space */
    }
}

/* Product Variants / Swatches Styles */
.product-variants {
    padding: 0 20px 15px;
}

.variant-label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}

.variant-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-thumb {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    border-radius: 4px; /* Square with rounded corners for images */
    cursor: pointer;
    border: 2px solid #eee;
    transition: all 0.2s ease;
    object-fit: cover;
}

.variant-thumb:hover, .variant-thumb.active {
    border-color: #c00000; /* Primary color highlight */
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- Mission & Vision --- */
.mission-vision {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.mission, .vision {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
}

.mission h3, .vision h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Our Story Section --- */
.our-story-grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

.our-story-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* --- Values Section --- */
.values-section {
    background-color: var(--white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid var(--light-gray);
}

.value-card:hover {
    transform: translateY(-5px);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.value-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* --- Why Choose Section --- */
.why-choose-section {
    background-color: var(--light-gray);
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.why-choose-item {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.why-number {
    font-size: 4rem;
    font-weight: bold;
    color: rgba(0,0,0,0.05);
    position: absolute;
    top: -10px;
    right: 10px;
    line-height: 1;
}

.why-choose-item h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
}

@media (min-width: 768px) {
    .our-story-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.our-story-content h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.our-story-content p {
    margin-bottom: 15px;
}