/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.cart-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background: var(--text-light);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-link {
    display: block;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    margin-top: 1rem;
}

/* Products Section */
.products-section {
    padding: 4rem 1rem;
}

.products-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: var(--bg-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-light);
}

.placeholder-image i {
    font-size: 4rem;
}

.placeholder-image.large i {
    font-size: 8rem;
}

.placeholder-image.small {
    height: 80px;
}

.placeholder-image.small i {
    font-size: 2rem;
}

.badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    min-height: 3rem;
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-description {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    min-height: 3rem;
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.product-detail-image {
    width: 100%;
}

.product-detail-image img {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.product-detail-info h1 {
    margin-bottom: 1rem;
}

.price-large {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.product-description-full {
    margin-bottom: 2rem;
}

.product-description-full h3 {
    margin-bottom: 1rem;
}

.product-features {
    margin-bottom: 2rem;
}

.product-features ul {
    list-style: none;
}

.product-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.product-features i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

.add-to-cart-form {
    margin-top: 2rem;
}

.quantity-selector {
    margin-bottom: 1rem;
}

.quantity-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.quantity-selector input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
}

/* Cart */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.cart-items {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 150px 150px 50px;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h3 {
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.875rem;
}

.cart-item-quantity input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

.cart-item-total {
    font-size: 1.125rem;
}

.btn-remove {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #dc2626;
}

.cart-summary {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h2 {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-of-type {
    border-bottom: none;
}

.total-amount {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.empty-cart,
.no-products {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-cart i,
.no-products {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.checkout-form,
.order-summary {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.checkout-form h2,
.order-summary h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-total {
    padding-top: 1rem;
    font-size: 1.25rem;
    text-align: right;
}

/* Payment */
.payment-info {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.payment-info p {
    margin-bottom: 0.5rem;
}

.payment-form {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.payment-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.payment-note i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

/* Success Page */
.success-message {
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-text {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.order-details-box {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    text-align: left;
}

.order-details-box h2 {
    margin-bottom: 1rem;
}

.order-details-box p {
    margin-bottom: 0.75rem;
}

.status-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.success-note {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

/* Admin Styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    background: var(--bg-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.admin-table tr:hover {
    background: var(--bg-light);
}

/* Social Sharing */
.social-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.social-share h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-light);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.copy-link {
    background: var(--text-light);
}

.share-btn i {
    font-size: 1.125rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* Instagram-Optimized Mobile Styles */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .product-detail-image {
        margin-bottom: 1.5rem;
    }
    
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 0.5rem;
    }
    
    .cart-item-quantity,
    .cart-item-total,
    .cart-item-actions {
        grid-column: 2;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 15px;
        right: 15px;
        font-size: 28px;
    }
    
    /* Better touch targets for mobile */
    .btn, .share-btn {
        min-height: 44px;
    }
    
    /* Optimize product cards for Instagram traffic */
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .product-image {
        height: 300px;
    }
}

/* Extra small devices (Instagram Stories size) */
@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-detail-info h1 {
        font-size: 1.5rem;
    }
    
    .price-large {
        font-size: 2rem;
    }
}

/* Fee Breakdown Styles */
#fee-breakdown {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#fee-notice {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

#fee-notice i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

/* Product Image Gallery */
.product-image-gallery {
    width: 100%;
}

.main-image {
    width: 100%;
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.image-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.image-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s, transform 0.3s;
}

.image-thumbnails img:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.image-thumbnails img.active {
    border-color: var(--primary-color);
    border-width: 3px;
}

/* Products Carousel */
.products-carousel-container {
    position: relative;
    margin: 2rem 0;
}

.products-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1rem 0;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

.products-carousel .product-card {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 280px;
    scroll-snap-align: start;
    height: 100%;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 10;
    transition: background 0.3s;
    box-shadow: var(--shadow-lg);
}

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

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

@media (max-width: 768px) {
    .products-carousel .product-card {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: 240px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
}

/* Quote Request Section */
.quote-section {
    background: var(--bg-color);
    padding: 4rem 1rem;
    margin: 3rem 0;
}

.quote-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.quote-section > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.quote-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Support Section */
.support-section {
    background: var(--bg-light);
    padding: 3rem 1rem;
    text-align: center;
}

.support-section h2 {
    margin-bottom: 1rem;
}

.support-section p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Support Hours Banner */
.support-banner {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.support-banner i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.support-banner strong {
    color: var(--primary-color);
}

/* Delivery Notice */
.delivery-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.delivery-notice i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

/* Color Selector */
.color-selector {
    margin-bottom: 1.5rem;
}

.color-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.color-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.color-option:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.color-option.selected {
    border-color: var(--primary-color);
    background: #e0e7ff;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* File Upload Styles */
input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-light);
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-dark);
}

