/* ========================================
   style.css - Rowmayo iCloud Technologies
   Enterprise IT Solutions & Academy
   ======================================== */

/* ----- CSS Variables ----- */
:root {
    --primary: #0056b3;
    --primary-dark: #003d82;
    --secondary: #1e2b3c;
    --accent: #0056b3;
    --light: #f8fafd;
    --dark: #0f1a28;
    --gray: #6c7a8a;
    --light-gray: #eef2f6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px rgba(0,86,179,0.15);
    --transition: all 0.3s ease;
}

/* ----- Global Styles ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--secondary);
    background-color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.text-accent { color: var(--primary); }
.bg-light { background-color: var(--light) !important; }
.bg-dark { background-color: var(--dark) !important; }

/* ----- Company Header ----- */
.company-header {
    background: var(--light);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.company-name {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

.company-name span {
    color: var(--primary);
}

.enterprise-tagline {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

/* ----- Preloader ----- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--light-gray);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----- Scroll to Top Button ----- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--white);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.scroll-top-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* ----- Navbar ----- */
.navbar {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,86,179,0.1);
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 48px;
    width: auto;
}

.brand-tagline {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray);
    border-left: 2px solid var(--primary);
    padding-left: 12px;
}

.nav-link {
    font-weight: 500;
    color: var(--secondary) !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 30px;
}

/* ----- Dropdown Menu ----- */
.dropdown-menu {
    background: var(--white);
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,50,100,0.25);
    padding: 1.5rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(0,86,179,0.1);
}

.dropdown-item {
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    font-size: 0.9rem;
    color: var(--secondary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateX(5px);
}

/* ----- Mega Menu Styles ----- */
.mega-menu {
    width: 1000px !important;
    max-width: 1000px;
    padding: 2rem !important;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,86,179,0.1);
}

.menu-main-category {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin: 1rem 0 0.8rem;
    text-transform: uppercase;
    border-left: 4px solid var(--primary);
    padding-left: 0.8rem;
}

.menu-subcategory {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--secondary);
    margin: 0.8rem 0 0.3rem;
    padding-left: 0.8rem;
}

.menu-item-link {
    display: block;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

.menu-item-link:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item-link i {
    width: 20px;
    color: var(--primary);
    font-size: 0.8rem;
}

.menu-column {
    border-right: 1px solid var(--light-gray);
    padding: 0 1rem;
}

.menu-column:last-child {
    border-right: none;
}

/* ----- Nested Dropdown ----- */
.nested-dropdown {
    position: relative;
}

.nested-dropdown > .menu-item-link::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    float: right;
    font-size: 0.7rem;
    margin-top: 5px;
    color: var(--gray);
}

.nested-menu {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 1rem;
    min-width: 220px;
    display: none;
    border: 1px solid var(--light-gray);
    z-index: 1000;
}

.nested-dropdown:hover > .nested-menu {
    display: block;
}

/* ----- Hero Slider ----- */
.hero-section {
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 85vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    isolation: isolate;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,25,50,0.9) 0%, rgba(0,15,30,0.7) 70%);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 700px;
}

.hero-text {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-text-delay {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.hero-btn {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out 0.4s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-indicators {
    z-index: 10;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* ----- Stats Section ----- */
.stats-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.5px;
}

/* ----- Service Cards ----- */
.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    cursor: pointer;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-card small {
    color: var(--gray);
    font-size: 0.85rem;
}

/* ========================================
   SHOP PAGE SPECIFIC STYLES
   ======================================== */

/* ----- Shop Hero ----- */
.shop-hero {
    background: linear-gradient(135deg, #0a1a2f 0%, #0e2a44 100%);
    padding: 120px 0 80px;
    color: white;
    margin-top: 70px;
}

/* ----- 3D Card Flip Styles ----- */
.product-card-3d {
    perspective: 1500px;
    height: 450px;
    margin-bottom: 20px;
}

.product-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.product-card-3d:hover .product-card-inner {
    transform: rotateY(180deg);
}

.product-card-front,
.product-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2f6;
}

.product-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #f8fafd 0%, #e6f0ff 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #0056b3;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.sale {
    background: #28a745;
}

.product-badge.hot {
    background: #dc3545;
}

.product-image {
    height: 200px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8fafd;
    padding: 1rem;
    transition: all 0.3s ease;
}

.product-card-front .product-image {
    height: 220px;
}

.product-card-back .product-image {
    height: 120px;
    margin-bottom: 1rem;
}

.product-content {
    padding: 1.2rem;
}

.product-category {
    color: #0056b3;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.product-rating {
    color: #ffc107;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.product-rating span {
    color: #6c7a8a;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.product-specs {
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.product-specs li {
    margin-bottom: 0.2rem;
    color: #4a5f73;
}

.product-specs i {
    color: #0056b3;
    width: 18px;
    font-size: 0.8rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0056b3;
    margin: 0.5rem 0;
}

.product-price small {
    font-size: 0.8rem;
    color: #6c7a8a;
    font-weight: 400;
}

.product-price .old-price {
    font-size: 0.9rem;
    color: #dc3545;
    text-decoration: line-through;
    margin-left: 0.3rem;
}

.btn-sm-custom {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 50px;
}

/* ----- Main Category Tabs (AliExpress Style) ----- */
.main-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 0.5rem;
    justify-content: center;
}

.main-category-tab {
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    background: white;
    border: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e2b3c;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main-category-tab:hover {
    background: #f0f7ff;
    border-color: #0056b3;
}

.main-category-tab.active {
    background: #0056b3;
    color: white;
    border-color: #0056b3;
}

/* ----- Mega Category Blocks ----- */
.category-mega-block {
    margin-bottom: 4rem;
    padding: 1.5rem;
    background: #f8fafd;
    border-radius: 24px;
}

.category-mega-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0056b3;
}

.category-mega-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0a1a2f;
}

.category-mega-title i {
    color: #0056b3;
    margin-right: 0.75rem;
    font-size: 1.8rem;
}

/* ----- Subcategory Grid ----- */
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.subcategory-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    text-decoration: none;
    color: #1e2b3c;
    transition: all 0.2s ease;
}

.subcategory-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,86,179,0.1);
    border-color: #0056b3;
    color: #0056b3;
}

.subcategory-link i {
    font-size: 1.8rem;
    color: #0056b3;
    margin-bottom: 0.5rem;
}

.subcategory-link span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ----- Filter Section ----- */
.filter-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.brand-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.brand-checkbox {
    flex: 1;
    min-width: 120px;
}

/* ----- Comparison Table ----- */
.comparison-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.comparison-table th {
    background: #0056b3;
    color: white;
    font-weight: 600;
    padding: 1rem;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #eef2f6;
}

/* ----- Warranty Badge ----- */
.warranty-badge {
    background: #e6f0ff;
    color: #0056b3;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    display: inline-block;
}

/* ----- View All Link ----- */
.view-all-link {
    color: #0056b3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #003d82;
    transform: translateX(5px);
}

/* ========================================
   PAYMENT MODAL STYLES
   ======================================== */

.payment-modal .modal-content {
    border-radius: 24px;
    overflow: hidden;
}

.payment-modal .modal-header {
    background: #0056b3;
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.payment-modal .btn-close {
    filter: brightness(0) invert(1);
}

.payment-option {
    border: 2px solid #eef2f6;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.payment-option:hover {
    border-color: #0056b3;
    background: #e6f0ff;
    transform: translateY(-3px);
}

.payment-option.selected {
    border-color: #0056b3;
    background: #e6f0ff;
}

.payment-option img {
    max-height: 40px;
    margin-bottom: 1rem;
}

.payment-option i {
    font-size: 2.5rem;
    color: #0056b3;
    margin-bottom: 0.5rem;
}

.secure-badge {
    background: #e6f0ff;
    color: #0056b3;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    font-size: 0.9rem;
}

/* ----- Bank Details Modal ----- */
.bank-details table {
    margin-bottom: 0;
}

.bank-details td {
    padding: 0.75rem 0;
    border-bottom: 1px dashed #eef2f6;
}

.bank-details tr:last-child td {
    border-bottom: none;
}

.copy-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* ----- Academy Hero ----- */
.academy-hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%), url('assets/images/training-center.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    padding: 120px 0 80px;
    color: var(--white);
    margin-top: 70px;
}

/* ----- Buttons ----- */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,86,179,0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--secondary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ----- Footer ----- */
footer {
    background: var(--dark) !important;
    color: #b0c4de;
    padding: 3rem 0;
}

footer a {
    color: #b0c4de;
    transition: var(--transition);
}

footer a:hover {
    color: var(--white);
}

/* ----- Modal ----- */
.modal-content {
    border-radius: 24px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--light-gray);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* ----- Responsive Adjustments ----- */
@media (max-width: 991px) {
    .mega-menu {
        width: 100% !important;
        max-width: 100%;
    }
    
    .menu-column {
        border-right: none;
        border-bottom: 1px solid var(--light-gray);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .nested-menu {
        position: static;
        box-shadow: none;
        padding-left: 1.5rem;
        display: block;
    }
}

@media (max-width: 768px) {
    .product-card-3d {
        height: 400px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-card-front .product-image {
        height: 180px;
    }
    
    .main-category-tab {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .category-mega-title {
        font-size: 1.2rem;
    }
    
    .subcategory-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
    
    .hero-slide {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-slide h1 {
        font-size: 2rem;
    }
    
    .hero-slide .lead {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
    }
    
    .brand-tagline {
        display: none;
    }
    
    .payment-option {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .payment-method {
        min-width: 100%;
    }
    
    .payment-tab-btn {
        min-width: 100%;
    }
    
    .company-name {
        font-size: 0.9rem;
    }
    
    .enterprise-tagline {
        font-size: 0.8rem;
    }
}

/* Social Media Float Buttons */
.whatsapp-float:hover,
.social-float:hover {
    transform: scale(1.1);
}

.whatsapp-float:hover {
    background-color: #20b859;
}

.facebook-float:hover {
    background-color: #1666c4;
}

.instagram-float:hover {
    transform: scale(1.1);
}

.tiktok-float:hover {
    background-color: #1a1a1a;
}

.linkedin-float:hover {
    background-color: #006699;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .whatsapp-float,
    .social-float {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .whatsapp-float {
        bottom: 80px;
    }
    
    .facebook-float {
        bottom: 140px;
    }
    
    .instagram-float {
        bottom: 200px;
    }
    
    .tiktok-float {
        bottom: 260px;
    }
    
    .linkedin-float {
        bottom: 320px;
    }
}

/* Social Media Icon Buttons - Footer */
.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.social-icon-btn:hover {
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Individual brand colors on hover for extra effect */
.social-icon-btn:hover {
    filter: brightness(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .social-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}