/**
 * Custom Styles - PoccaStyle
 * Paleta: Purpura/Mauve basada en el logo
 */

/* ============================================
   BASE STYLES
   ============================================ */

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #C9A0B8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7D4068;
}

::selection {
    background: #9B5080;
    color: white;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.font-display {
    font-family: 'Playfair Display', serif;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #7D4068;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #663558;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #7D4068;
    color: #7D4068;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #7D4068;
    color: white;
}

/* ============================================
   FORMS
   ============================================ */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #9B5080;
    box-shadow: 0 0 0 3px rgba(125, 64, 104, 0.1);
}

input[type="checkbox"] {
    accent-color: #7D4068;
}

input[type="radio"] {
    accent-color: #7D4068;
}

/* ============================================
   CARDS
   ============================================ */

.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

header.sticky {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Nav Drawer */
#nav-drawer {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-overlay {
    transition: opacity 0.3s ease;
}

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

#cart-panel {
    transition: transform 0.3s ease;
}

#cart-overlay {
    transition: opacity 0.3s ease;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

#toast {
    z-index: 9999;
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #F5E1EE 25%, #E8BFD8 50%, #F5E1EE 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* ============================================
   IMAGES
   ============================================ */

img[src=""],
img:not([src]) {
    background: #FDF5FA;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* ============================================
   UTILITIES
   ============================================ */

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* ============================================
   COLOR SELECTOR
   ============================================ */

/* Small dots for product cards */
.color-dot-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    flex-shrink: 0;
}

/* Large dots for product detail page */
.color-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.1);
}

.color-dot:hover {
    transform: scale(1.1);
    box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-dot.active {
    border-color: #7D4068;
    box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.1), 0 0 0 2px white, 0 0 0 4px #7D4068;
}

/* Thumbnail buttons for color selection (when color has an image) */
.color-thumb {
    display: inline-flex;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    padding: 0;
    background: none;
}

.color-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.color-thumb:hover {
    transform: scale(1.06);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.color-thumb.active {
    border-color: #7D4068;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #7D4068;
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */

.search-overlay {
    display: none;
}

.search-overlay:not(.hidden) {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.search-overlay .search-modal {
    animation: fadeIn 0.2s ease-out forwards;
}

.search-result-item {
    display: flex;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}

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

.search-result-item:hover {
    background-color: #FDF5FA;
}

@media (max-width: 767px) {
    .search-overlay .search-modal {
        margin-top: 0;
        min-height: 100vh;
        border-radius: 0;
    }
}

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

@media (max-width: 768px) {
    button,
    a {
        min-height: 44px;
    }
}

@media print {
    header, footer, #cart-drawer, #toast, .no-print {
        display: none !important;
    }
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, #7D4068, #C9A0B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shimmer-mauve {
    background: linear-gradient(90deg, #C9A0B8, #7D4068, #C9A0B8);
    background-size: 200% auto;
    animation: shimmerMauve 3s linear infinite;
}

@keyframes shimmerMauve {
    to {
        background-position: 200% center;
    }
}
