:root {
    --color-primary: #d31b73;
    --color-primary-dark: #C41466;
    --color-primary-light: #FF3D94;
    --color-secondary: #009DA5;
    --color-secondary-dark: #007A80;
    --color-secondary-light: #00BFC9;
    --color-text: #333333;
    --color-text-light: #7c868f;
    --color-text-muted: #9CA3AF;
    --color-background: #FFFFFF;
    --color-background-alt: #FDF2F4;
    --color-border: #E5E7EB;
    --color-success: #10B981;
    --color-danger: #EF4444;
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 150ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-background-alt);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    font-size: inherit;
}

/* Header */
.header {
    background: var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.header__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
    min-height: 50px;
}

@media (min-width: 768px) {
    .header__container {
        padding: 0.5rem 1.5rem;
        gap: 1.5rem;
        min-height: 60px;
        justify-content: flex-start;
    }
}

.header__logo--desktop {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.header__logo--mobile {
    display: block;
    position: absolute;
    left: 0;
    top: 5px;
    z-index: 10;
}

.header__logo--mobile img {
    max-width: 120px;
    width: 120px;
    height: 120px;
}

@media (min-width: 768px) {
    .header__logo--desktop {
        display: block;
    }
    
    .header__logo--mobile {
        display: none;
    }
    
    .header__logo--desktop img {
        height: 120px;
        margin-top: -8px;
        margin-left: -8px;
    }
}

@media (min-width: 1024px) {
    .header__logo--desktop img {
        height: 150px;
        margin-top: -10px;
        margin-left: -10px;
    }
}

.header__search {
    flex: 1;
    max-width: 450px;
    position: relative;
    display: none;
    margin-left: auto;
}

@media (min-width: 768px) {
    .header__search {
        display: block;
    }
}

.header__search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.header__search-input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1.25rem;
    border: none;
    border-radius: 50px;
    background: var(--color-background);
    transition: box-shadow var(--transition);
    font-size: 0.9375rem;
}

.header__search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.header__search-input::placeholder {
    color: var(--color-text-muted);
}

.header__actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

@media (min-width: 768px) {
    .header__actions {
        display: flex;
        gap: 1rem;
        margin-left: 0;
    }
}

.header__social {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .header__social {
        display: flex;
    }
}

.header__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    transition: background-color var(--transition), transform var(--transition);
}

.header__social-link:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.header__social-link svg {
    width: 16px;
    height: 16px;
}

.header__cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    transition: background-color var(--transition), transform var(--transition);
}

.header__cart:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.header__cart-icon {
    width: 18px;
    height: 18px;
    color: white;
}

.header__cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-secondary);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-primary);
}

.header__mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

@media (min-width: 768px) {
    .header__mobile-actions {
        display: none;
    }
}

.header__cart--mobile {
    display: flex;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.header__search-toggle,
.header__menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: white;
    transition: background-color var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 20;
}

@media (min-width: 768px) {
    .header__search-toggle {
        display: none;
    }
}

.header__search-toggle:hover,
.header__menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.header__search-toggle svg,
.header__menu-toggle svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 768px) {
    .header__search-toggle,
    .header__menu-toggle {
        display: none;
    }
}

.header__mobile-search {
    display: none;
    padding: 0.75rem 1rem 0.75rem 130px;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
}

.header__mobile-search--open {
    display: block;
}

@media (min-width: 768px) {
    .header__mobile-search {
        display: none !important;
    }
}

.header__mobile-search-form {
    position: relative;
}

.header__mobile-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.header__mobile-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    background: var(--color-background-alt);
    font-size: 0.9375rem;
}

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

/* Categories Navigation */
.categories-nav {
    background: transparent;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

@media (min-width: 768px) {
    .categories-nav {
        max-height: none;
        overflow: visible;
        padding: 2rem 0;
        padding-top: 70px;
    }
}

@media (min-width: 1024px) {
    .categories-nav {
        padding-top: 90px;
    }
}

.categories-nav--open {
    max-height: 70vh;
    padding: 1rem 0;
    overflow-y: auto;
}

.categories-nav__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.categories-nav__wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .categories-nav__wrapper {
        margin-left: 140px;
        max-width: calc(100% - 140px);
    }
    
    .categories-nav__wrapper::before,
    .categories-nav__wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 40px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
        z-index: 2;
        border-radius: 50px;
    }
    
    .categories-nav__wrapper::before {
        left: 0;
        background: linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    }
    
    .categories-nav__wrapper::after {
        right: 0;
        background: linear-gradient(to left, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    }
    
    .categories-nav__wrapper--fade-left::before {
        opacity: 1;
    }
    
    .categories-nav__wrapper--fade-right::after {
        opacity: 1;
    }
}

@media (min-width: 1024px) {
    .categories-nav__wrapper {
        margin-left: 170px;
        max-width: calc(100% - 170px);
    }
}

.categories-nav__arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 5;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(229, 23, 117, 0.35);
}

.categories-nav__arrow svg {
    width: 18px;
    height: 18px;
}

.categories-nav__arrow:hover {
    background: var(--color-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.categories-nav__arrow--left {
    left: -16px;
}

.categories-nav__arrow--right {
    right: -16px;
}

@media (min-width: 768px) {
    .categories-nav__arrow {
        display: flex;
    }
    
    .categories-nav__arrow--visible {
        opacity: 1;
        visibility: visible;
    }
}

.categories-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
    background: var(--color-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 0;
    width: 100%;
    max-height: calc(70vh - 3rem);
    overflow-y: auto;
}

@media (min-width: 768px) {
    .categories-nav__list {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0;
        padding: 0.375rem;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        -ms-overflow-style: none;
        max-width: fit-content;
        max-height: none;
        margin: 0;
        border-radius: 50px;
        width: auto;
    }

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

.categories-nav__item {
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    background: transparent;
    transition: all var(--transition);
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .categories-nav__item {
        padding: 0.75rem 1.75rem;
    }
}

@media (min-width: 1024px) {
    .categories-nav__item {
        padding: 0.875rem 2.5rem;
        font-size: 1rem;
    }
}

.categories-nav__item:hover {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 23, 117, 0.35);
}

.categories-nav__item--active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 23, 117, 0.35);
}

.categories-nav__item--active:hover {
    background: var(--color-primary);
    color: white;
}

/* Alerts */
.alerts {
    max-width: 1280px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    animation: slideIn 0.3s ease;
}

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

.alert--success {
    background: #D1FAE5;
    color: #065F46;
}

.alert--danger {
    background: #FEE2E2;
    color: #991B1B;
}

.alert--accent,
.alert--primary,
.alert--info {
    background: #E0F2FE;
    color: #0C4A6E;
}

.alert__close {
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity var(--transition);
}

.alert__close:hover {
    opacity: 1;
}

/* Main Content */
.main {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    width: 100%;
}

/* Catalog Header */
.catalog-header {
    margin-bottom: 1.5rem;
}

.catalog-header__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
}

@media (min-width: 768px) {
    .catalog-header__title {
        font-size: 1.75rem;
    }
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Product Card */
.product-card {
    background: transparent;
    border-radius: var(--radius-lg);
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(229, 23, 117, 0.12);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card__image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: visible;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.03);
}

.product-card__content {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

@media (min-width: 768px) {
    .product-card__content {
        padding: 0.75rem 0;
    }
}

.product-card__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

@media (min-width: 768px) {
    .product-card__name {
        font-size: 1rem;
    }
}

.product-card__price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    display: block;
}

.product-card__actions {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-card__cart-form {
    display: inline-flex;
}

.product-card__btn {
    width: auto;
    min-width: 100px;
    padding: 0.45rem 0.875rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
}

.product-card__btn--primary {
    background: var(--color-primary);
    color: white;
}

.product-card__btn--primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(229, 23, 117, 0.35);
}

.product-card__btn--secondary {
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.product-card__btn--secondary:hover {
    background: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 157, 165, 0.35);
}

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

.product-card__btn svg {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all var(--transition);
}

.pagination__btn:hover:not(.pagination__btn--disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination__btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination__btn svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    color: var(--color-text-muted);
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.empty-state__text {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.empty-state__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background-color var(--transition);
}

.empty-state__btn:hover {
    background: var(--color-primary-dark);
}

/* Footer */
.footer {
    background-image:
        url('/images/footer.png'),
        linear-gradient(to bottom, transparent 0px, transparent 40px, var(--color-primary) 40px);
    background-size:
        auto 150px,
        100% 100%;
    background-repeat:
        repeat-x,
        no-repeat;
    background-position:
        center top,
        center top;
    color: white;
    margin-top: auto;
}

@media (min-width: 768px) {
    .footer {
        background-size:
            auto 220px,
            100% 100%;
    }
}

.footer__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem 1rem;
}

@media (min-width: 768px) {
    .footer__container {
        padding: 2.5rem 1.5rem 1.5rem;
    }
}

.footer__content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer__content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer__logo img {
    height: 80px;
    width: auto;
}

@media (min-width: 768px) {
    .footer__logo img {
        height: 100px;
    }
}

.footer__nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__nav-link {
    color: white;
    font-size: 1rem;
    font-weight: 400;
    transition: opacity var(--transition);
}

.footer__nav-link:hover {
    opacity: 0.8;
}

.footer__nav-link sup {
    font-size: 0.625rem;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-secondary);
    border-radius: 50%;
    color: white;
    transition: transform var(--transition), opacity var(--transition);
}

.footer__social-link:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
}

.footer__social-text {
    font-size: 0.875rem;
    color: var(--color-secondary);
    margin-top: 0.25rem;
}

.footer__bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer__bottom-link {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    transition: opacity var(--transition);
}

.footer__bottom-link:hover {
    opacity: 0.7;
}

.footer__copyright {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer__legal {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile Search (shown in nav) - DEPRECATED */
.mobile-search {
    display: none;
    padding: 0 1rem 1rem;
    background: var(--color-background);
}

@media (min-width: 768px) {
    .mobile-search {
        display: none;
    }
}

.mobile-search__form {
    position: relative;
}

.mobile-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.mobile-search__input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-background-alt);
    font-size: 1rem;
}

.mobile-search__input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--color-background-alt) 25%, #e5e5e5 50%, var(--color-background-alt) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
