/**
 * MAAR Concept - Store Pages Styles
 * Design System 2.0 - Areia & Terracota
 */

/* === STORE LAYOUT === */
#store-body {
    background-color: var(--sand-lightest) !important;
}

#store-index-container,
#product-detail-container {
    margin-top: 100px;
}

.super_container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main#store-main {
    flex: 1 0 auto;
}

/* === HERO SECTION === */
.store-hero {
    background: linear-gradient(135deg, var(--sand) 0%, var(--beige-light) 100%);
    padding: var(--space-16) 0;
    margin-top: 100px;
}

.store-hero-title {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    color: var(--terracota);
    margin-bottom: var(--space-4);
}

.store-hero-subtitle {
    color: var(--brown);
    font-size: var(--text-lg);
}

/* === SECTION TITLES === */
.store-section-title {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
    font-size: var(--h2-size);
}

/* === FILTERS SIDEBAR === */
.filters-sidebar {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 120px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-header h3 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
    margin: 0;
}

.filter-section {
    border-bottom: 1px solid var(--sand);
    padding-bottom: var(--space-4);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--brown);
    margin-bottom: var(--space-3);
}

/* Category Groups */
.category-group {
    margin-bottom: var(--space-3);
}

.btn-category-group {
    width: 100%;
    background: var(--sand-lightest);
    border: 1px solid var(--sand);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: left;
    font-weight: var(--font-medium);
    color: var(--brown-dark);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-base);
}

.btn-category-group:hover {
    background: var(--sand-light);
    border-color: var(--terracota);
}

.btn-category-group i {
    transition: transform var(--transition-base);
}

.btn-category-group[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.category-group-content {
    padding: var(--space-3) 0;
}

.category-item {
    margin-bottom: var(--space-2);
}

.form-check-input:checked {
    background-color: var(--terracota);
    border-color: var(--terracota);
}

.form-check-label {
    color: var(--brown);
    cursor: pointer;
    transition: color var(--transition-base);
}

.form-check-label:hover {
    color: var(--terracota);
}

.subcategory-list {
    margin-left: var(--space-4);
    margin-top: var(--space-2);
}

/* Active Filters */
#active-filters-list .badge {
    background: var(--terracota);
    color: white;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    margin-right: var(--space-2);
    margin-bottom: var(--space-2);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

#active-filters-list .badge i {
    cursor: pointer;
}

/* === PRODUCT CARDS === */
#products-grid {
    margin-bottom: var(--space-8);
}

.product-card {
    border: 1px solid var(--sand);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-medium);
    background: white;
    cursor: pointer;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--terracota);
}

/* Product Image */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--sand-lightest);
    aspect-ratio: 1 / 1;
    height: 280px;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.1);
}

.product-no-image {
    aspect-ratio: 1 / 1;
    background: var(--sand-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-no-image i {
    font-size: 3rem;
}

/* Stock Badges */
.badge-stock-low,
.badge-out-stock {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    z-index: 2;
}

.badge-stock-low {
    background: #ff9800;
    color: white;
}

.badge-out-stock {
    background: #f44336;
    color: white;
}

/* Product Card Body */
.product-card .card-body {
    padding: var(--space-5);
}

.product-name {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
    font-size: var(--text-lg);
    line-height: 1.3;
    margin-bottom: var(--space-2);
}

.product-description {
    color: var(--brown);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.product-categories {
    margin-bottom: var(--space-3);
}

.category-badge {
    background: var(--sand);
    color: var(--brown);
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: var(--font-medium);
}

/* Product Pricing */
.product-pricing {
    border-top: 1px solid var(--sand);
    padding-top: var(--space-3);
    margin-bottom: var(--space-3);
}

.price-display {
    color: var(--terracota);
    font-weight: var(--font-bold);
}

.price-main {
    font-size: 1.3rem;
}

/* Product Stock */
.product-stock {
    font-size: var(--text-sm);
}

.product-stock i {
    font-size: var(--text-xs);
}

/* === PRODUCT DETAIL PAGE === */
#product-breadcrumb .breadcrumb {
    background: white;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

#product-breadcrumb .breadcrumb-item a {
    color: var(--terracota);
    text-decoration: none;
    transition: color var(--transition-base);
}

#product-breadcrumb .breadcrumb-item a:hover {
    color: var(--terracota-dark);
}

#product-breadcrumb .breadcrumb-item.active {
    color: var(--brown);
}

/* Product Images */
#product-main-image {
    margin-bottom: var(--space-4);
}

#main-product-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border: 1px solid var(--sand);
    border-radius: var(--radius-lg);
}

.thumbnail-image {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    height: 100px;
    object-fit: cover;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--terracota);
}

/* Product Info */
#product-title {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
}

#product-info .alert {
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
}

#product-description h4 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
}

.product-no-image-detail {
    height: 600px;
    border: 1px solid var(--sand);
}

.product-no-image-detail i {
    font-size: 5rem;
}

/* Price Card */
#product-info .card,
.product-price-card {
    border: 2px solid var(--terracota);
    background-color: var(--sand-lightest);
    border-radius: var(--radius-lg);
}

#product-info .price-display {
    color: var(--terracota);
    font-weight: var(--font-bold);
    font-size: var(--h2-size);
}

/* Add to Cart Form */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.quantity-selector .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.quantity-selector input[type="number"] {
    width: 80px;
    text-align: center;
    border: 1px solid var(--sand);
    border-radius: var(--radius-md);
    padding: var(--space-2);
}

.btn-add-to-cart {
    background: var(--terracota);
    border-color: var(--terracota);
    color: white;
    padding: var(--space-4) var(--space-8);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    transition: all var(--transition-medium);
}

.btn-add-to-cart:hover {
    background: var(--terracota-dark);
    border-color: var(--terracota-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* === CART PAGE === */
.cart-item-row {
    border-bottom: 1px solid var(--sand);
    padding: var(--space-4) 0;
}

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

.cart-item-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.cart-item-title {
    text-decoration: none;
    color: var(--brown-dark);
    font-weight: var(--font-semibold);
    transition: color var(--transition-base);
}

.cart-item-title:hover {
    color: var(--terracota);
}

.cart-quantity-input {
    width: 60px !important;
}

.cart-item-subtotal {
    color: var(--terracota);
}

.cart-summary-card {
    position: sticky;
    top: 120px;
    background: white;
    border: 2px solid var(--terracota);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.cart-summary-title {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
    margin-bottom: var(--space-4);
}

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

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

.cart-total {
    font-size: var(--h4-size);
    font-weight: var(--font-bold);
    color: var(--terracota);
}

/* === BUTTONS === */
.btn-outline-primary {
    border-color: var(--terracota);
    color: var(--terracota);
}

.btn-outline-primary:hover {
    background: var(--terracota);
    border-color: var(--terracota);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--brown);
    color: var(--brown);
}

.btn-outline-secondary:hover {
    background: var(--brown);
    border-color: var(--brown);
    color: white;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 991px) {
    #store-index-container,
    #product-detail-container {
        margin-top: 80px;
    }
    
    .store-hero {
        margin-top: 80px;
        padding: var(--space-12) 0;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    #store-main-content {
        margin-top: 80px !important;
    }
    
    .product-image-wrapper {
        height: 220px;
    }
}

@media (max-width: 767px) {
    #store-index-container,
    #product-detail-container {
        margin-top: 70px;
    }
    
    .store-hero {
        margin-top: 70px;
        padding: var(--space-10) 0;
    }
    
    .product-card .card-body {
        padding: var(--space-4);
    }
    
    .product-name {
        font-size: var(--text-base);
    }
    
    .price-main {
        font-size: 1.1rem;
    }
    
    .cart-summary-card {
        position: static;
    }
    
    .product-image-wrapper {
        height: 200px;
    }
}

/* === OFFCANVAS (Mobile Filters) === */
.offcanvas-title {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    color: var(--brown-dark);
}

.offcanvas-body {
    background: var(--sand-lightest);
}

/* === MESSAGE ANIMATIONS === */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.message-animated {
    animation: fadeInLeft 0.5s ease-out;
    transition: opacity 0.5s ease-out;
}
