/* ===== GARMENTS PAGE STYLES ===== */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --light-bg: #f8fafc;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Base Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.garments-hero {
    background: linear-gradient(
            135deg,
            rgba(0, 85, 170, 0.7) 0%,   /* slightly transparent overlay */
            rgba(44, 90, 160, 0.6) 100%
        ),
        url('../images/garmentshero-bg.webp') no-repeat center center/cover;
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.garments-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/garmentshero-bg.webp') center/cover;
    opacity: 0.1;
}

.garments-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.garments-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.garments-hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Quick Stats */
.quick-stats {
    background: var(--light-bg);
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 700;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 20px auto;
    border-radius: 2px;
}

.section-description {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Horizontal Categories Stack */
.horizontal-categories-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 50px;
}

.horizontal-category-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.horizontal-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Category Images Section - UPDATED FOR MOBILE */
.category-images {
    position: relative;
    overflow: hidden;
    background: var(--light-bg);
    min-height: 400px;
    aspect-ratio: 1 / 1; /* Maintain square ratio on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: pan-y pinch-zoom;
}

.category-images-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
    width: 100%;
}

.category-image {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain for better mobile display */
    display: block;
    border-radius: 8px;
}

/* Image Navigation - IMPROVED FOR MOBILE TOUCH */
.image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.image-nav-arrow:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.image-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.image-nav-arrow.prev {
    left: 15px;
}

.image-nav-arrow.next {
    right: 15px;
}

.image-nav-arrow i {
    font-size: 1.3rem;
}

/* Image Navigation Dots - UPDATED FOR MOBILE */
.category-image-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.image-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

.image-dot.active {
    background: white;
    transform: scale(1.3);
}

.image-dot:hover {
    background: white;
    transform: scale(1.2);
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-badge.popular {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* Category Content */
.category-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.category-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.category-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Specifications Grid */
.specs-grid {
    margin: 25px 0;
    background: var(--light-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.spec-row:last-child {
    margin-bottom: 0;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spec-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-value {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* Features Tags */
.features-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.feature-tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Subcategories Section */
.subcategories-section {
    margin: 25px 0;
    padding: 25px;
    background: var(--light-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.subcategories-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.subcategory-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.subcategory-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.subcategory-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.subcategory-content {
    flex: 1;
}

.subcategory-content h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.subcategory-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.subcategory-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.subcategory-specs .spec {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Guide Section */
.guide-section {
    background: var(--light-bg);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.guide-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.guide-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #2c5aa0);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
}

.guide-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.guide-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.recommended-products {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.product-tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Technical Specifications */
.specs-tabs {
    margin-top: 50px;
}

.tabs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-button:hover:not(.active) {
    color: var(--text-dark);
}

.tabs-content {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.tab-panel {
    display: none;
    padding: 30px;
}

.tab-panel.active {
    display: block;
}

.specs-table {
    overflow-x: auto;
    border-radius: 8px;
}

.specs-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.specs-table th {
    background: var(--light-bg);
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.specs-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.specs-table tr:hover td {
    background: rgba(37, 99, 235, 0.02);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5aa0 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE DESIGN - MOBILE FIRST APPROACH ===== */

/* Large Desktop */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .garments-hero h1 {
        font-size: 3rem;
    }
}

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .horizontal-category-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .category-images {
        min-height: 350px;
        aspect-ratio: 16 / 9; /* Wider aspect ratio for tablet */
    }
    
    .category-content {
        padding: 35px 30px;
    }
    
    .garments-hero h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .garments-hero {
        padding: 80px 0 60px;
    }
    
    .garments-hero h1 {
        font-size: 2.2rem;
    }
    
    .garments-hero p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .category-images {
        min-height: 300px;
        aspect-ratio: 1 / 1; /* Square on mobile */
    }
    
    .category-image img {
        padding: 15px;
    }
    
    .category-content {
        padding: 30px 25px;
    }
    
    .category-title {
        font-size: 1.6rem;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .guide-card {
        padding: 30px 25px;
    }
    
    .tabs-header {
        flex-direction: column;
        gap: 5px;
        border-bottom: none;
    }
    
    .tab-button {
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
        padding: 15px 20px;
    }
    
    .tab-button.active {
        border-left-color: var(--primary-color);
        border-bottom-color: var(--border-color);
    }
    
    .tab-panel {
        padding: 25px 20px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .garments-hero {
        padding: 60px 0 40px;
    }
    
    .garments-hero h1 {
        font-size: 1.8rem;
    }
    
    .garments-hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        padding: 6px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .horizontal-categories-stack {
        gap: 30px;
        margin-top: 40px;
    }
    
    .horizontal-category-card {
        border-radius: 15px;
    }
    
    .category-images {
        min-height: 280px;
        aspect-ratio: 1 / 1; /* Perfect square on small mobile */
    }
    
    .category-image {
        padding: 15px;
    }
    
    /* Improved mobile navigation buttons */
    .image-nav-arrow {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .image-nav-arrow.prev {
        left: 10px;
    }
    
    .image-nav-arrow.next {
        right: 10px;
    }
    
    .image-nav-arrow i {
        font-size: 1rem;
    }
    
    .category-image-nav {
        bottom: 15px;
        padding: 8px 12px;
    }
    
    .image-dot {
        width: 10px;
        height: 10px;
    }
    
    .category-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .category-content {
        padding: 25px 20px;
    }
    
    .category-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .category-title {
        font-size: 1.4rem;
    }
    
    .category-description {
        font-size: 0.95rem;
    }
    
    .specs-grid {
        padding: 15px;
        margin: 20px 0;
    }
    
    .features-tags {
        gap: 8px;
    }
    
    .feature-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .subcategories-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .subcategory-item {
        padding: 12px;
        gap: 12px;
    }
    
    .subcategory-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .guide-card {
        padding: 25px 20px;
    }
    
    .guide-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .guide-card h3 {
        font-size: 1.2rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .category-images {
        min-height: 250px;
    }
    
    .category-content {
        padding: 20px 15px;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .specs-grid {
        padding: 12px;
    }
    
    .subcategories-section {
        padding: 15px;
    }
    
    .tabs-content {
        border-radius: 12px;
    }
    
    .tab-panel {
        padding: 20px 15px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .image-nav-arrow {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .image-dot {
        width: 12px;
        height: 12px;
    }
    
    .subcategory-item:hover {
        transform: none;
    }
    
    .horizontal-category-card:hover {
        transform: none;
    }
    
    .guide-card:hover {
        transform: none;
    }
    
    /* Enhanced touch feedback */
    .image-nav-arrow:active {
        background: var(--primary-color);
        color: white;
        transform: translateY(-50%) scale(0.9);
    }
    
    .image-dot:active {
        transform: scale(1.1);
    }
}

/* High DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .category-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .garments-hero {
        background: white !important;
        color: black !important;
        padding: 40px 0 !important;
    }
    
    .hero-buttons,
    .image-nav-arrow,
    .category-image-nav {
        display: none !important;
    }
    
    .horizontal-category-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .category-images {
        min-height: 200px !important;
    }
}