/* Compact Styles for Nanon Ice Cream Project - Reduced by ~20% */
/* Import Prompt Font */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties - Reduced Sizes by ~20% */
:root {
    /* Font Sizes - Reduced by ~20% */
    --font-size-xs: 0.7rem;      /* was 0.875rem */
    --font-size-sm: 0.8rem;      /* was 1rem */
    --font-size-base: 0.8rem;    /* was 1rem */
    --font-size-lg: 0.96rem;     /* was 1.2rem */
    --font-size-xl: 1.12rem;     /* was 1.4rem */
    --font-size-2xl: 1.28rem;    /* was 1.6rem */
    --font-size-3xl: 1.6rem;     /* was 2rem */
    --font-size-4xl: 2rem;       /* was 2.5rem */
    --font-size-5xl: 2.4rem;     /* was 3rem */
    
    /* Spacing - Reduced by ~20% */
    --spacing-xs: 0.4rem;        /* was 0.5rem */
    --spacing-sm: 0.6rem;        /* was 0.75rem */
    --spacing-md: 0.8rem;        /* was 1rem */
    --spacing-lg: 1.2rem;        /* was 1.5rem */
    --spacing-xl: 1.6rem;        /* was 2rem */
    --spacing-2xl: 2.4rem;       /* was 3rem */
    --spacing-3xl: 3.2rem;       /* was 4rem */
    
    /* Border Radius - Reduced by ~20% */
    --radius-sm: 6px;            /* was 8px */
    --radius-md: 10px;           /* was 12px */
    --radius-lg: 16px;           /* was 20px */
    --radius-xl: 24px;           /* was 30px */
    
    /* Padding & Margins - Reduced by ~20% */
    --padding-xs: 0.4rem;        /* was 0.5rem */
    --padding-sm: 0.6rem;        /* was 0.75rem */
    --padding-md: 0.8rem;        /* was 1rem */
    --padding-lg: 1.2rem;        /* was 1.5rem */
    --padding-xl: 1.6rem;        /* was 2rem */
    --padding-2xl: 2.4rem;       /* was 3rem */
    
    /* Button Sizes - Reduced by ~20% */
    --btn-padding-y: 0.6rem;     /* was 0.75rem */
    --btn-padding-x: 1.2rem;     /* was 1.5rem */
    --btn-font-size: 0.76rem;    /* was 0.95rem */
    
    /* Navbar Sizes - Increased for better visibility */
    --navbar-height: 80px;       /* Increased from 64px */
    --navbar-padding: 1.2rem;    /* Increased from 0.8rem */
    --logo-height: 60px;         /* Increased from 48px */
    --logo-max-width: 150px;     /* Increased from 120px */
    
    /* Card Sizes - Reduced by ~20% */
    --card-padding: 1.6rem;      /* was 2rem */
    --card-margin: 0.8rem;       /* was 1rem */
    
    /* Table Sizes - Reduced by ~20% */
    --table-padding: 0.8rem;     /* was 1rem */
    --table-padding-sm: 0.6rem;  /* was 0.75rem */
    
    /* Icon Sizes - Reduced by ~20% */
    --icon-size-sm: 0.8rem;      /* was 1rem */
    --icon-size-md: 1.2rem;      /* was 1.5rem */
    --icon-size-lg: 1.6rem;      /* was 2rem */
    --icon-size-xl: 2.4rem;      /* was 3rem */
    --icon-size-2xl: 3.2rem;     /* was 4rem */
    
    /* Container Sizes - Reduced by ~20% */
    --container-padding: 1.6rem; /* was 2rem */
    --section-margin: 2.4rem;    /* was 3rem */
    --card-gap: 1.6rem;          /* was 2rem */
}

/* Main Styles */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, #f8fffe 0%, #f0fff4 50%, #f0f9ff 100%);
    color: #1a202c;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.nav-link,
.btn,
input,
textarea,
select,
.form-label,
.card-title {
    font-family: 'Prompt', sans-serif;
}

/* Modern Navbar - Unified Style */
.navbar, .bg-primary, .admin-navbar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 3px 16px rgba(16, 185, 129, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar, .admin-navbar {
    min-height: var(--navbar-height);
    padding: var(--navbar-padding) 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: var(--logo-height) !important;
    max-width: var(--logo-max-width);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: #fff !important;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    padding: var(--spacing-sm) var(--spacing-lg) !important;
    border-radius: var(--radius-sm);
    margin: 0 0.2rem;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Navbar Toggler - Fix for mobile */
.navbar-toggler {
    border: none !important;
    padding: var(--padding-xs) !important;
    border-radius: var(--radius-sm) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.05) !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
    outline: none !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.2em !important;
    height: 1.2em !important;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    background-attachment: fixed;
    overflow: hidden;
    background-size: 2000px auto !important;
    background-position: center center !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.35) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out;
}

.hero-section p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-section .btn {
    animation: fadeInUp 1s ease-out 0.4s both;
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
}

.hero-section .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    font-weight: 600;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    color: #fff;
}

.hero-section img {
    animation: fadeInUp 1s ease-out 0.6s both;
    transition: all 0.5s ease;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero-section img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4));
}

/* Container and Section Styles */
.container {
    padding: var(--container-padding);
}

.section {
    margin: var(--section-margin) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: #6b7280;
    font-weight: 400;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 26px rgba(16, 185, 129, 0.08);
    background: #fff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    margin-bottom: var(--card-gap);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-body {
    padding: var(--card-padding);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.card-text {
    font-size: var(--font-size-base);
    color: #6b7280;
    line-height: 1.6;
}

/* Button Styles */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    transition: all 0.3s ease;
    border: none;
    font-size: var(--btn-font-size);
    letter-spacing: 0.4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    color: #fff;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

/* Form Styles */
.form-control {
    border-radius: var(--radius-md);
    border: 2px solid #e2e8f0;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
}

.form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
}

.form-select {
    border-radius: var(--radius-md);
    border: 2px solid #e2e8f0;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
}

.form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

/* Table Styles */
.table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    background: #fff;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    font-weight: 600;
    color: #374151;
    padding: var(--table-padding);
    font-size: var(--font-size-base);
}

.table tbody td {
    padding: var(--table-padding);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: var(--font-size-base);
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* Alert Styles */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-base);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Badge Styles */
.badge {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: var(--padding-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.badge-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

/* Modal Styles */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--spacing-lg);
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: var(--spacing-lg);
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideInRight 0.5s ease-out 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.py-1 { padding-top: var(--spacing-xs); padding-bottom: var(--spacing-xs); }
.py-2 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-3 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-4 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }

.px-1 { padding-left: var(--spacing-xs); padding-right: var(--spacing-xs); }
.px-2 { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.px-3 { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.px-4 { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }

/* Responsive Utilities */
@media (max-width: 768px) {
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .card {
        margin-bottom: var(--spacing-md);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    .container {
        padding: var(--spacing-md);
    }
    
    .hero-section {
        min-height: 400px !important;
        background-attachment: scroll !important;
        background-size: 1600px auto !important;
    }
    
    .hero-section h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-section p {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .table thead th,
    .table tbody td {
        padding: var(--table-padding-sm);
    }
    
    .container {
        padding: var(--spacing-sm);
    }
    
    .hero-section {
        min-height: 350px !important;
        background-size: 1400px auto !important;
    }
    
    .hero-section h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-section .btn {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
}

/* Featured Products - Original Size (No scaling) */
#featured-products .product-card {
    transform: scale(1);
    transform-origin: center center;
    margin: 0;
}

/* Featured Products & New Products - 6 Columns Layout */
#featured-products .col-lg-2.col-md-4.col-sm-6.mb-4,
.new-arrivals .col-lg-2.col-md-4.col-sm-6.mb-4 {
    margin-bottom: 1.5rem !important; /* Original spacing */
}

/* Ensure 6 columns fit properly and continue to next row */
#featured-products .row,
.new-arrivals .row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

#featured-products .col-lg-2,
.new-arrivals .col-lg-2 {
    flex: 0 0 16.666667%; /* 6 columns = 100% / 6 */
    max-width: 16.666667%;
    margin-right: 0;
}

/* Remove right margin from 6th column to prevent gap */
#featured-products .col-lg-2:nth-child(6n),
.new-arrivals .col-lg-2:nth-child(6n) {
    margin-right: 0;
}

/* Featured Products Image - Original Size */
#featured-products .product-image {
    max-height: 200px !important; /* Original size */
    object-fit: cover;
}

/* Featured Products Card Body - Original Size */
#featured-products .product-card .card-body {
    padding: 1rem !important; /* Original size */
}

/* Featured Products Buttons - Original Size */
#featured-products .product-card .btn {
    font-size: 1rem !important; /* Original size */
    padding: 0.375rem 0.75rem !important; /* Original padding */
}

/* Featured Products Title - Original Size */
#featured-products .product-card .card-title {
    font-size: 1.25rem !important; /* Original size */
}

/* Featured Products Description - Original Size */
#featured-products .product-card .card-text {
    font-size: 1rem !important; /* Original size */
}

/* Featured Products Badge - Original Size */
#featured-products .badge {
    font-size: 1rem !important; /* Original size */
    padding: 0.25rem 0.5rem !important; /* Original padding */
}

/* SweetAlert2 CSS Compatibility Fixes */
.swal2-icon {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Additional SweetAlert2 fixes for Safari */
.swal2-popup {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.swal2-title {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.swal2-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Bootstrap CSS Compatibility Fixes */
/* Fix for text-align: -webkit-match-parent */
th {
    text-align: match-parent;
}

/* Fix for -webkit-text-size-adjust */
body {
    text-size-adjust: 100%;
}

/* Additional Bootstrap compatibility fixes */
.table th {
    text-align: match-parent;
}

/* Ensure all table headers use standard text-align */
thead th {
    text-align: match-parent;
}

/* Fix for any remaining Bootstrap compatibility issues */
* {
    text-size-adjust: 100%;
}
