/* 
 * HabibPrint.com Main Stylesheet
 * CMYK Color Theme with Modern Design
 */

/* CSS Variables using sophisticated CMYK-inspired theme */
:root {
    --primary: #0097A7;    /* Deep Cyan - professional blue-green */
    --secondary: #D81B60;  /* Deep Magenta - sophisticated pink */
    --accent: #FFC107;     /* Amber - warm yellow accent */
    --dark: #1a1a1a;       /* Rich Black - softer than pure black */
    --light: #FFFFFF;      /* White */
    
    /* Muted CMYK tones for backgrounds */
    --cyan-muted: #E0F7FA;
    --magenta-muted: #FCE4EC;
    --yellow-muted: #FFF8E1;
    
    /* Grays */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Subtle Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    --gradient-subtle: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --gradient-dark: linear-gradient(135deg, var(--gray-900), var(--dark));
    
    /* Additional color variations */
    --primary-dark: #00838F;
    --secondary-dark: #AD1457;
    --accent-dark: #F9A825;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 1rem 2rem rgba(0, 0, 0, 0.1);
    
    /* Border radius */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
    
    /* Badge colors */
    --badge-new: #28a745;
    --badge-hot: #dc3545;
    --badge-sale: #ffc107;
    --badge-limited: #6f42c1;
    --badge-bestseller: #fd7e14;
    --badge-featured: #007bff;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--light);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--light);
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary);
    border: 2px solid var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--dark);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.nav-link:hover {
    color: var(--primary) !important;
    background-color: rgba(0, 151, 167, 0.1);
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* Header Styles */
.top-bar {
    font-size: 0.875rem;
}

.header.sticky-top {
    box-shadow: var(--shadow);
}

/* Breadcrumb */
.breadcrumb-section {
    background: var(--gray-100) !important;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--secondary);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 151, 167, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: var(--bs-success);
    color: var(--bs-success);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: var(--bs-danger);
    color: var(--bs-danger);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left-color: var(--bs-warning);
    color: var(--bs-warning);
}

/* Footer */
.footer {
    background: var(--gradient-dark) !important;
}

.footer h6 {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--dark) !important;
    transform: translateY(-3px);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {
    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); }
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card .card-img-top {
    transition: var(--transition);
    height: 250px;
    object-fit: cover;
}

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

.product-card .card-body {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    transform: translateY(100%);
    transition: var(--transition);
}

.product-card:hover .card-body {
    transform: translateY(0);
}

/* Price Badge */
.price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--dark);
    color: var(--light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-xl);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 151, 167, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .footer .col-md-6,
    .footer .col-md-4 {
        text-align: center !important;
        margin-bottom: 2rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .product-card:hover .card-img-top {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0066CC;
        --secondary: #CC0066;
        --accent: #CCCC00;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .whatsapp-float,
    .btn-back-to-top,
    .alert {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Homepage Hero Section */
.hero-section {
    background: var(--gradient-subtle);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,151,167,0.05) 0%, transparent 70%);
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* CMYK Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Service Cards */
.service-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
    transform: scale(1.1);
}

/* Feature Section */
.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
}

/* Testimonial Cards */
.testimonial-card {
    border-radius: 20px;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 60px;
    color: rgba(0,151,167,0.15);
    font-family: Georgia, serif;
}

/* Stats Counter */
.stats-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 20px
    );
}

/* CTA Section */
.cta-section {
    background: var(--primary);
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation for WhatsApp */
@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 0.7;
    }
    40%, 50% {
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.whatsapp-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25D366;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
    z-index: -1;
}

/* Product Badge Styles */
.product-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 2;
}

.product-badge.badge-sm {
    padding: 0.125rem 0.375rem;
    font-size: 0.6rem;
}

.product-badge.badge-lg {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Badge Type Colors */
.product-badge.badge-new {
    background: var(--badge-new);
}

.product-badge.badge-hot {
    background: var(--badge-hot);
    animation: pulse 2s infinite;
}

.product-badge.badge-sale {
    background: var(--badge-sale);
    color: var(--dark);
}

.product-badge.badge-limited {
    background: var(--badge-limited);
}

.product-badge.badge-bestseller {
    background: var(--badge-bestseller);
}

.product-badge.badge-featured {
    background: var(--badge-featured);
}

/* Badge animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Product card badge positioning */
.product-card {
    position: relative;
}

.product-card .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.product-card .product-badge.corner-top-right {
    left: auto;
    right: 10px;
}

/* Badge hover effects */
.product-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

/* Sale price display */
.price-with-sale {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.original-price {
    text-decoration: line-through;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.sale-price {
    color: var(--badge-sale);
    font-weight: bold;
    font-size: 1.1rem;
}

.discount-percentage {
    color: var(--badge-hot);
    font-weight: bold;
    font-size: 0.875rem;
}