/**
 * SwissApp Shops - Public Storefront Styles
 */

:root {
    --primary: #F97316;
    --primary-dark: #EA580C;
    --primary-light: #FDBA74;
    --secondary: #1f2937;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-screen {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #E5E7EB;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   ERROR STATE
   ======================================== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-content {
    max-width: 400px;
}

.error-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    background: #FEE2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #EF4444;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   HEADER
   ======================================== */

.shop-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-banner {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary);
    position: relative;
}

.header-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3));
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.shop-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shop-logo {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    overflow: hidden;
}

.shop-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.shop-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.shop-status.open {
    color: var(--success);
}

.shop-status.closed {
    color: var(--danger);
}

.shop-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   CART BUTTON
   ======================================== */

.cart-button {
    position: relative;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.cart-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

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

/* ========================================
   CATEGORIES NAV
   ======================================== */

.categories-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.category-chip {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   PRODUCTS GRID
   ======================================== */

.products-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* ========================================
   PRODUCT CARD
   ======================================== */

.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    cursor: pointer;
}

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

.product-image {
    height: 180px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-image .placeholder {
    font-size: 3rem;
    color: var(--text-muted);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card-body {
    padding: 1rem;
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price .old-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* ========================================
   PRODUCT MODAL
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-image {
    height: 250px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-product-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-product-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Product Options */
.product-options {
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-label .required {
    color: var(--danger);
    font-size: 0.75rem;
}

.option-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-choice {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-choice:hover {
    border-color: var(--primary);
}

.option-choice.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.option-choice .price-modifier {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.option-choice.selected .price-modifier {
    color: rgba(255,255,255,0.8);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-label {
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.quantity-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.quantity-value {
    width: 50px;
    text-align: center;
    font-weight: 600;
    font-size: 1.125rem;
}

/* Special Instructions */
.special-instructions {
    margin-bottom: 1.5rem;
}

.special-instructions label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.special-instructions textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
}

.special-instructions textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Add to Cart Button */
.modal-add-to-cart {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.modal-add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-add-to-cart:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   CART DRAWER
   ======================================== */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    animation: fadeIn 0.2s ease-out;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: white;
    z-index: 301;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-options {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

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

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-qty-btn {
    background: white;
    border: 1px solid var(--border-color);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.cart-item-qty-btn:hover {
    background: var(--border-color);
}

.cart-item-qty-value {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem;
}

/* Cart Footer */
.cart-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.cart-summary {
    margin-bottom: 1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cart-summary-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.checkout-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

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

.checkout-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========================================
   CHECKOUT PAGE
   ======================================== */

.checkout-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
}

.checkout-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.checkout-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.checkout-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Order Type Selection */
.order-type-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.order-type-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.order-type-option:hover {
    border-color: var(--primary);
}

.order-type-option.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.05);
}

.order-type-option i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.order-type-option span {
    font-weight: 500;
}

/* Payment Methods */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: var(--primary);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.05);
}

.payment-option i {
    font-size: 1.25rem;
    color: var(--primary);
    width: 30px;
}

.payment-option span {
    font-weight: 500;
}

/* Order Summary */
.order-summary-items {
    margin-bottom: 1rem;
}

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

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

.order-summary-item-name {
    flex: 1;
}

.order-summary-item-qty {
    color: var(--text-secondary);
    margin-right: 1rem;
}

.place-order-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    margin-top: 1rem;
}

.place-order-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.place-order-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   ORDER CONFIRMATION
   ======================================== */

.order-confirmation {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.confirmation-content {
    max-width: 400px;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--success), #16A34A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.confirmation-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confirmation-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.order-number {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.order-number-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.order-number-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.back-to-shop-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.back-to-shop-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   SHOP CLOSED OVERLAY
   ======================================== */

.shop-closed-banner {
    background: var(--danger);
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */

.shop-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-shop-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-contact {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-contact a {
    color: var(--primary);
}

.footer-powered {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-powered a {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .header-banner {
        height: 120px;
    }
    
    .header-content {
        height: 60px;
    }
    
    .shop-logo {
        width: 40px;
        height: 40px;
    }
    
    .shop-name {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-card-body {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.875rem;
    }
    
    .product-description {
        display: none;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-drawer {
        max-width: 100%;
    }
}

/* ========================================
   SIDEBAR LAYOUT (Food Template)
   ======================================== */

.shop-layout-sidebar {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.shop-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.shop-main-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-primary);
}

/* Sidebar Categories */
.sidebar-categories {
    padding: 0 1rem;
}

.sidebar-category-group {
    margin-bottom: 0.5rem;
}

.sidebar-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.sidebar-category-header:hover {
    background: var(--bg-primary);
}

.sidebar-category-header i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.sidebar-category-header.collapsed i {
    transform: rotate(-90deg);
}

.sidebar-category-children {
    padding-left: 0.5rem;
}

.sidebar-category-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-category-item:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.sidebar-category-item.active {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   FOOD TEMPLATE STYLES
   ======================================== */

.template-food .shop-header {
    background: var(--secondary);
}

.template-food .header-content {
    max-width: 1400px;
}

.template-food .shop-name {
    color: white;
}

.template-food .shop-status {
    color: rgba(255,255,255,0.7);
}

.template-food .shop-status.open {
    color: var(--accent);
}

.template-food .shop-logo {
    border: 2px solid rgba(255,255,255,0.2);
}

.template-food .cart-button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: none;
}

.template-food .cart-button:hover {
    background: rgba(255,255,255,0.1);
}

.template-food .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

/* Food Template - List Layout */
.template-food.layout-list .products-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-food.layout-list .product-card {
    flex-direction: row;
    border-radius: var(--radius-lg);
}

.template-food.layout-list .product-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.template-food.layout-list .product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-food.layout-list .product-footer {
    margin-top: auto;
}

.template-food.layout-list .add-to-cart-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.template-food.layout-list .product-card {
    position: relative;
}

/* ========================================
   RETAIL TEMPLATE STYLES
   ======================================== */

.template-retail .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.template-retail .product-card {
    border-radius: var(--radius-lg);
}

.template-retail .product-image {
    height: 200px;
}

/* ========================================
   SERVICE TEMPLATE STYLES
   ======================================== */

.template-service .product-card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.template-service .product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.template-service .product-image {
    height: 160px;
}

.template-service .add-to-cart-btn {
    width: 100%;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    padding: 0.75rem;
}

.template-service .product-footer {
    flex-direction: column;
    align-items: stretch;
}

/* ========================================
   SIDEBAR RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .shop-sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .shop-layout-sidebar {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }
    
    .sidebar-categories {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-category-group {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .sidebar-category-header {
        padding: 0.5rem 1rem;
        background: var(--bg-primary);
        border-radius: 9999px;
        font-size: 0.875rem;
    }
    
    .sidebar-category-header i {
        display: none;
    }
    
    .sidebar-category-children {
        display: none;
    }
    
    .sidebar-category-item {
        padding: 0.5rem 1rem;
        background: var(--bg-primary);
        border-radius: 9999px;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .shop-main-content {
        padding: 1rem;
    }
    
    .template-food.layout-list .product-image {
        width: 80px;
        height: 80px;
    }
    
    .template-food.layout-list .add-to-cart-btn {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }
}
