/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float i {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Hero Slider */
.main-slider {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.home-slider {
    position: relative;
    width: 100%;
    height: 500px;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-item.active {
    opacity: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
}

.slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    width: 25px;
    border-radius: 5px;
}

/* Service Section */
.ummah-service-main {
    padding: 2.5rem 0;
    background: white;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.service-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.service-col {
    display: flex;
}

.service-card {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    transition: all 0.3s;
    background: #f9fafb;
}

.service-card:hover {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.08);
    transform: translateY(-2px);
}

.service-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.service-title {
    flex: 1;
}

.service-title h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    line-height: 1.3;
    text-align: left;
}

/* Category Section */
.ummah-category-main {
    padding: 3rem 0;
    background: #f9fafb;
}

.category-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-item {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
    border: 1px solid #e5e7eb;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-item:hover .category-img img {
    transform: scale(1.05);
}

.category-info {
    padding: 1.25rem;
    text-align: center;
}

.category-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    text-transform: capitalize;
}

/* New Arrival Section */
.ummah-new-arrival {
    padding: 3rem 0;
    background: white;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: none;
}

.view-all-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--primary-color);
    border-radius: 0.375rem;
    transition: all 0.3s;
}

.view-all-link:hover {
    background: var(--primary-color);
    color: white;
}

.product-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Product Card */
.ummah-product-card {
    position: relative;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.ummah-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
}

.product-tags {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 9;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.discount-badge {
    background: #22c55e;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.icon-group {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 9;
}

.wishlist-btn {
    width: 38px;
    height: 38px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #9ca3af;
    transition: all 0.3s;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    color: #ef4444;
    transform: scale(1.1);
}

.product-img-link {
    display: block;
    overflow: hidden;
    position: relative;
    padding-bottom: 100%;
    background: #f3f4f6;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ummah-product-card:hover .product-img {
    transform: scale(1.05);
}

.product-details {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.product-name h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em;
}

.product-name a {
    color: var(--dark-color);
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sale-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
}

.regular-price {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    align-items: stretch;
}

.product-actions form {
    flex: 1;
    display: flex;
}

.btn-order-now,
.btn-add-cart {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 38px;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-order-now {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    width: 100%;
}

.btn-order-now:hover {
    background: #00b377;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.3);
}

.btn-add-cart {
    width: 100%;
    background: #1a1a1a;
    color: white;
}

.btn-add-cart:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Quantity Controls */
.cart-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.375rem;
    gap: 0.5rem;
}

.qty-decrease,
.qty-detail-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-decrease {
    background: #ef4444;
    color: white;
    border: none;
}

.qty-decrease:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.qty-detail-link {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.qty-detail-link:hover {
    background: #005a42;
    transform: scale(1.05);
}

.qty-display {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark-color);
}

/* Newsletter */
.newsletter-subscribe {
    background: linear-gradient(135deg, var(--primary-color), #005a42);
    padding: 4rem 0;
    margin-top: 3rem;
}

.newsletter-box {
    text-align: center;
    color: white;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-box h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.newsletter-box p {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.subscribe-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.95rem;
}

.subscribe-form button {
    padding: 0.875rem 2rem;
    white-space: nowrap;
}

/* Responsive Design */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .product-wrapper {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 1200px) {
    .product-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .product-img {
        height: 260px;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 991px) {
    .container {
        max-width: 960px;
    }

    .service-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .service-card {
        padding: 1rem 0.75rem;
    }

    .service-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .category-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .product-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-img {
        height: 240px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 1rem;
    }

    /* Hero Slider */
    .home-slider {
        height: 400px;
    }

    /* Service Section - 2x2 Grid */
    .service-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .service-col {
        display: flex;
    }

    .service-card {
        padding: 0.875rem;
        flex-direction: row;
        gap: 0.65rem;
        height: 100%;
    }

    .service-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1rem;
    }

    .service-title h6 {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    /* Categories */
    .category-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-img {
        height: 200px;
    }

    /* Products */
    .product-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-details {
        padding: 1rem;
    }

    .product-name h4 {
        font-size: 0.9rem;
    }

    .sale-price {
        font-size: 1rem;
    }

    .btn-order-now,
    .btn-add-cart {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    /* Newsletter */
    .subscribe-form {
        flex-direction: column;
    }

    /* WhatsApp Float - Above bottom nav */
    .whatsapp-float {
        bottom: 80px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 576px) {
    .container {
        padding: 0 0.5rem;
    }

    .home-slider {
        height: 300px;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .section-head {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }

    .category-wrapper {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .category-img {
        height: 150px;
    }

    .product-wrapper {
        gap: 0.5rem;
    }

    .btn-order-now,
    .btn-add-cart {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    /* Section spacing */
    .ummah-service-main,
    .ummah-category-main,
    .ummah-new-arrival {
        padding: 1.5rem 0;
    }

    .category-info {
        padding: 0.75rem;
    }

    .category-info h3 {
        font-size: 0.9rem;
    }

    .newsletter-subscribe {
        padding: 2rem 0;
        margin-top: 1.5rem;
    }
}

/* Mobile Small (481px - 575px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    /* Hero */
    .home-slider {
        height: 250px;
    }

    /* Service - More compact 2x2 */
    .service-row {
        gap: 0.5rem;
    }

    .service-card {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .service-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.9rem;
    }

    .service-title h6 {
        font-size: 0.7rem;
    }

    /* Categories - 2 columns for better compactness */
    .category-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .category-img {
        height: 140px;
    }

    /* Products - 2 columns */
    .product-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .product-details {
        padding: 0.5rem;
    }

    .product-tags {
        top: 0.5rem;
        left: 0.5rem;
    }

    .icon-group {
        top: 0.5rem;
        right: 0.5rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.35rem;
    }

    .btn-order-now,
    .btn-add-cart {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 30px;
    }

    /* Newsletter */
    .newsletter-box h2 {
        font-size: 1.25rem;
    }

    .newsletter-box p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    /* Section spacing */
    .ummah-service-main,
    .ummah-category-main,
    .ummah-new-arrival {
        padding: 1rem 0;
    }
}

/* Mobile Extra Small (<400px) */
@media (max-width: 400px) {
    .service-card {
        padding: 0.65rem 0.5rem;
    }

    .service-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.9rem;
    }

    .service-title h6 {
        font-size: 0.7rem;
    }

    .product-name h4 {
        font-size: 0.85rem;
    }

    .sale-price {
        font-size: 0.95rem;
    }
}

/* Hero Sidebar Layout */
.hero-section {
    padding: 2rem 0;
    background: #fff;
}

.hero-layout {
    display: flex;
    gap: 2rem;
    position: relative;
}

.hero-sidebar {
    width: 25%;
    min-width: 250px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    height: 500px;
    display: none;
    /* Default hidden on mobile, shown on desktop via media query */
}

.sidebar-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-menu {
    overflow-y: auto;
    height: calc(100% - 56px);
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 5px;
}

.sidebar-menu li {
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-menu li:last-child {
    border-bottom: none !important;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-menu li a:hover {
    color: var(--primary-color) !important;
    background: #f9fafb;
    padding-left: 1.25rem !important;
}

.sidebar-menu li a div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Home Slider Container */
.home-slider-container {
    flex: 1;
    width: 0;
    min-width: 0;
}

/* Override previous styles */
.home-slider {
    border-radius: 0.75rem;
    overflow: hidden;
    height: 500px;
}

/* Responsive Sidebar Logic */
@media (min-width: 992px) {
    .hero-sidebar {
        display: block !important;
    }
}

@media (max-width: 991px) {
    .hero-sidebar {
        display: none;
    }

    .hero-layout {
        display: block !important;
    }

    .home-slider {
        height: 350px !important;
    }
}

/* Desktop Mega Menu Navigation */
.desktop-main-menu {
    width: 100%;
}

.menu-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
    padding: 1rem 0;
}

.menu-item>a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.menu-item:hover>a,
.menu-item.active>a {
    color: var(--primary-color);
}

.menu-item>a::after {
    content: '';
    position: absolute;
    bottom: 0.8rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.menu-item:hover>a::after {
    width: 100%;
}

.menu-item:hover .mega-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* Mega Menu Dropdown */
.mega-menu-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 80vw;
    max-width: 1200px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border-top: 3px solid var(--primary-color);
}


.mega-menu-inner {
    display: flex;
    gap: 2rem;
}

/* Mega Menu Columns */
.mega-column-group {
    flex: 3;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
}

.mega-col {
    flex: 1;
}

.mega-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.mega-col ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-col ul li a {
    text-decoration: none;
    color: #6b7280;
    font-size: 0.95rem;
    transition: color 0.2s, transform 0.2s;
    display: block;
}

.mega-col ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Mega Menu Image */
.mega-image {
    flex: 1;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 300px;
}

.mega-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.mega-image:hover img {
    transform: scale(1.05);
}

.mega-img-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.mega-img-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.mega-img-content .btn-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid white;
    padding-bottom: 2px;
}