/* =====================================================
   SeaSalt Pickles - Main Stylesheet
   ===================================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D4451A33;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4451A66;
}

/* Hide scrollbar for category scroll */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Input styling */
input[type="tel"]::-webkit-inner-spin-button,
input[type="tel"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="tel"],
input[type="number"] {
    -moz-appearance: textfield;
}

/* =====================================================
   Spin Wheel Styles
   ===================================================== */
#spin-wheel {
    position: relative;
    background: conic-gradient(
        from 0deg,
        #DAA520 0deg 60deg,
        #2E7D32 60deg 120deg,
        #E53935 120deg 180deg,
        #2E7D32 180deg 240deg,
        #D4451A 240deg 300deg,
        #2E7D32 300deg 360deg
    );
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    font-weight: 800;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transform-origin: 100% 100%;
}

.wheel-segment.segment-1 {
    transform: rotate(-30deg) translateY(-100%);
}

.wheel-segment.segment-2 {
    transform: rotate(30deg) translateY(-100%);
    font-size: 10px;
}

.wheel-segment.segment-3 {
    transform: rotate(90deg) translateY(-100%);
}

.wheel-segment.segment-4 {
    transform: rotate(150deg) translateY(-100%);
    font-size: 10px;
}

.wheel-segment.segment-5 {
    transform: rotate(210deg) translateY(-100%);
}

.wheel-segment.segment-6 {
    transform: rotate(270deg) translateY(-100%);
    font-size: 10px;
}

/* =====================================================
   Product Card Styles
   ===================================================== */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image-container {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    overflow: hidden;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-ribbon {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #DAA520, #F4C430);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-quick-add {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: #D4451A;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 69, 26, 0.3);
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.product-card:hover .product-quick-add {
    opacity: 1;
    transform: scale(1);
}

.product-info {
    padding: 12px;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.product-category {
    font-size: 11px;
    color: #D4451A;
    font-weight: 500;
    margin-bottom: 8px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.product-price .current {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.product-price .size {
    font-size: 11px;
    color: #666;
}

/* =====================================================
   Category Pill Styles
   ===================================================== */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-pill:hover {
    border-color: #D4451A;
    color: #D4451A;
}

.category-pill.active {
    background: #D4451A;
    border-color: #D4451A;
    color: white;
}

.category-pill .emoji {
    font-size: 16px;
}

/* =====================================================
   Cart Item Styles
   ===================================================== */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cart-item-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #FFF7ED;
}

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

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

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-variant {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

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

.cart-qty-control {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #D4451A;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.cart-qty-btn:hover {
    background: #e5e5e5;
}

.cart-qty-value {
    width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.cart-item-price {
    font-weight: 700;
    font-size: 15px;
    color: #D4451A;
}

/* =====================================================
   Variant Selection Styles
   ===================================================== */
.variant-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-option:hover {
    border-color: #D4451A;
}

.variant-option.selected {
    background: #D4451A;
    border-color: #D4451A;
    color: white;
}

.variant-option .size {
    font-weight: 600;
}

.variant-option .price {
    margin-left: 8px;
    opacity: 0.8;
}

/* =====================================================
   Toast Notification Styles
   ===================================================== */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #1a1a1a;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease-out, fadeOut 0.3s ease-out 2.7s forwards;
    max-width: 320px;
}

.toast.success {
    background: #2E7D32;
}

.toast.error {
    background: #E53935;
}

.toast.info {
    background: #1976D2;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =====================================================
   Bottom Navigation Styles
   ===================================================== */
.nav-item {
    position: relative;
    color: #666;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: #D4451A;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #D4451A;
    border-radius: 0 0 3px 3px;
}

/* =====================================================
   Section Headers
   ===================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.section-link {
    font-size: 14px;
    font-weight: 600;
    color: #D4451A;
}

/* =====================================================
   Category Section Styles
   ===================================================== */
.category-section {
    padding: 24px 16px;
    max-width: 512px;
    margin: 0 auto;
}

.category-section:nth-child(even) {
    background: #f9fafb;
}

.category-banner {
    background: linear-gradient(135deg, #D4451A 0%, #9A3412 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-banner-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.category-banner-info p {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.category-banner-icon {
    font-size: 48px;
    opacity: 0.9;
}

/* =====================================================
   Checkout Page Styles
   ===================================================== */
.checkout-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.checkout-section-title {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    background: white;
    border-color: #D4451A;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

/* =====================================================
   Responsive Adjustments
   ===================================================== */
@media (min-width: 640px) {
    .product-card {
        border-radius: 20px;
    }
    
    .product-name {
        font-size: 15px;
    }
    
    .product-info {
        padding: 16px;
    }
}

/* =====================================================
   Loading States
   ===================================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* =====================================================
   Page Transition Styles
   ===================================================== */
.page {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.page.active {
    display: block;
}

/* =====================================================
   Empty State Styles
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-title {
    font-weight: 600;
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: #666;
}

/* =====================================================
   Utility Classes
   ===================================================== */
.text-gradient {
    background: linear-gradient(135deg, #D4451A, #DAA520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 40px rgba(212, 69, 26, 0.2);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #D4451A, #DAA520) border-box;
}
