/* Main CSS for Rug Review Website */
:root {
    --primary-color: #3E2E2A;
    --primary-hover: #2D201D;
    --secondary-color: #8D7B6B;
    --accent-color: #CAB19F;
    --light-beige: #FAF7F3;
    --dark-text: #1C1B1A;
    --light-text: #6c757d;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --rounded-sm: 0.125rem;
    --rounded: 0.25rem;
    --rounded-md: 0.375rem;
    --rounded-lg: 0.5rem;
    --rounded-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #fff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Font Styles */
.serif-font {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.transition {
    transition: var(--transition);
}

.bg-light-beige {
    background-color: var(--light-beige);
}

.text-primary {
    color: var(--primary-color) !important;
}

.object-cover {
    object-fit: cover;
}

.z-index-1 {
    z-index: 1;
}

/* Section Styles */
.section-title {
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Playfair Display', Georgia, serif;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0;
    background-color: var(--light-beige);
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.product-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.placeholder-image {
    height: 200px;
}

.product-title {
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-badge {
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--rounded);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Service Cards Enhancement */
.service-icon {
    color: var(--primary-color);
}

.service-card {
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Contact Section Enhancement */
.contact-item {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
}

/* Multi-Select Tools */
.product-card-selectable {
    position: relative;
}

.product-select-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
    transform: scale(1.3);
}

.product-card-selectable:hover .product-select-checkbox,
.product-select-checkbox:checked {
    opacity: 1;
}

.multi-select-toolbar {
    background: rgba(255,255,255,0.95);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    position: sticky;
    bottom: 20px;
    z-index: 100;
    display: none;
    transition: transform 0.3s, opacity 0.3s;
    transform: translateY(20px);
    opacity: 0;
}

.multi-select-toolbar.active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(0);
    opacity: 1;
}

/* Card Footer Fix */
.card-footer {
    background-color: transparent;
    border-top: none;
    padding: 0.75rem 1.25rem;
}

/* Featured Products Carousel */
.featured-img-container img {
    transition: transform 0.5s;
}

.carousel-item.active .featured-img-container img {
    transform: scale(1.05);
}

/* Search Form Enhancement */
.search-form .form-control {
    padding-left: 1rem;
    height: 42px;
    border-color: #ced4da;
}

.search-form .btn {
    height: 42px;
    width: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel Controls */
.carousel-control-prev, 
.carousel-control-next {
    width: 5%;
    background-color: rgba(0,0,0,0.2);
    border-radius: 50%;
    height: 50px;
    width: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: var(--rounded);
    border: 1px solid var(--gray-300);
    background-color: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(62, 46, 42, 0.1);
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--rounded);
}

.alert-success {
    color: var(--success-color);
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    color: var(--danger-color);
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    color: var(--warning-color);
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem 0;
}

.pagination .btn {
    margin: 0.25rem;
}

/* Wishlist and Cart */
.wishlist-badge, .cart-count {
    position: relative;
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 50%;
    color: #fff;
    background-color: var(--primary-color);
}

/* Star Rating */
.star-rating {
    color: var(--gray-300);
    display: inline-block;
}

.star-rating .filled {
    color: var(--warning-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.6rem 1.2rem;
    }
}

/* Auth Forms */
.auth-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Product View Page */
.product-image-gallery {
    margin-bottom: 1rem;
}

.product-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.product-thumbnail:hover, .product-thumbnail.active {
    border-color: var(--primary-color);
}

.product-main-image {
    height: 400px;
    width: 100%;
    object-fit: contain;
    background-color: #fff;
    border-radius: var(--rounded-md);
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
}

.qty-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background-color: var(--gray-200);
}

.qty-input {
    width: 50px;
    text-align: center;
    margin: 0 10px;
    border: none;
    font-weight: 600;
}

/* Product details */
.product-details h1 {
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.product-price-discount {
    font-size: 1.25rem;
    text-decoration: line-through;
    color: var(--gray-500);
    margin-right: 0.5rem;
}

.product-meta {
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.product-description {
    margin: 2rem 0;
    line-height: 1.7;
}

/* Category Management Styles */
.category-management {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.category-management .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.category-management .btn-close {
    font-size: 0.7rem;
    padding: 0.25rem;
}

#selected-categories {
    min-height: 38px;
    padding: 0.5rem;
    border: 1px dashed #ced4da;
    border-radius: 0.25rem;
    background-color: white;
}
