/* Craftora Marketplace Design System */

:root {
    --primary: #d46a43;
    --primary-dark: #b8522c;
    --primary-light: #fbeee7;
    --cream: #faf7f2;
    --cream-dark: #f0eae1;
    --surface: #ffffff;
    --text: #222222;
    --muted: #595959;
    --border: #e8e2d9;
    --shadow: 0 4px 20px rgba(34, 34, 34, 0.06);
    --shadow-hover: 0 12px 30px rgba(212, 106, 67, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Global Reset & Typography */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--surface);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--cream);
}
::-webkit-scrollbar-thumb {
    background: #d4cbbd;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #bdae9c;
}

/* Base Layout */
.main-wrapper {
    min-height: 70vh;
}

/* Announcement Bar */
.announcement-bar {
    background: linear-gradient(135deg, var(--primary), #e07f59);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Navbar & Subnav styling */
.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40%;
    height: 3px;
    background: var(--primary-dark);
    border-radius: 2px;
}

.form-search-input {
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: var(--cream);
}

.form-search-input:focus {
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 4px rgba(212, 106, 67, 0.1);
}

.nav-icon-btn {
    font-size: 1.35rem;
    color: var(--text);
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    border: none;
    background: transparent;
}

.nav-icon-btn:hover {
    background-color: var(--cream);
    color: var(--primary);
}

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

.nav-avatar-img-container {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-light);
}

.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cream-dark);
    color: var(--muted);
}

.category-subnav {
    overflow-x: auto;
    white-space: nowrap;
}

.subnav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.subnav-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Dropdown styling */
.dropdown-menu {
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.dropdown-menu-item:hover {
    background-color: var(--cream) !important;
    color: var(--primary) !important;
}

/* Premium Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    transition: var(--transition);
    font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 106, 67, 0.3) !important;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    transition: var(--transition);
    font-weight: 600;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 106, 67, 0.15) !important;
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at 80% 20%, #fefcf9 0%, var(--cream) 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--text);
    font-weight: 800;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.floating-cards-container {
    position: relative;
    height: 400px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.floating-card-1, .floating-card-2 {
    position: absolute;
    width: 240px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 0.75rem;
    transition: transform 0.5s ease-out;
    animation: floatUpDown 6s ease-in-out infinite alternate;
}

.floating-card-1 {
    top: 10%;
    right: 15%;
    transform: rotate(6deg) translateZ(20px);
}

.floating-card-2 {
    bottom: 10%;
    right: 45%;
    transform: rotate(-8deg) translateZ(40px);
    animation-delay: -3s;
}

@keyframes floatUpDown {
    0% { transform: translateY(0px) rotate(6deg); }
    100% { transform: translateY(-15px) rotate(8deg); }
}

/* Product Cards & 3D Tilt Effect */
.product-card-wrapper {
    perspective: 1000px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 106, 67, 0.2);
}

.product-image-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: var(--cream);
    transform: translateZ(20px);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 50px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.badge-handmade { background: #d46a43; color: white; }
.badge-vintage { background: #5a7b6c; color: white; }
.badge-digital { background: #5c7499; color: white; }

.btn-favorite-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--surface);
    color: var(--muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    z-index: 10;
}

.btn-favorite-toggle:hover {
    transform: scale(1.1);
    color: #e04f5f;
}

.btn-favorite-toggle.active {
    color: #e04f5f;
}

.product-details {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transform: translateZ(10px);
}

.product-seller {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.product-title-link {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-title-link:hover {
    color: var(--primary);
}

.product-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.old-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--muted);
}

/* Category Cards */
.category-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 106, 67, 0.2);
}

.category-image-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.25rem;
    border: 3px solid var(--cream-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.category-image-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Premium Features section */
.features-section {
    background-color: var(--cream);
    padding: 5rem 0;
}

.feature-box {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 100%;
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

/* Forms & Cards Styling */
.card-premium {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.form-label-premium {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control-premium {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background-color: var(--cream);
}

.form-control-premium:focus {
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 4px rgba(212, 106, 67, 0.1);
}

/* Seller CTA Card */
.seller-cta-card {
    background: linear-gradient(135deg, #1c2b2d 0%, #2f4f4f 100%);
    border-radius: var(--radius-lg);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.seller-cta-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(212, 106, 67, 0.15);
    filter: blur(80px);
}

/* Footer elements */
.bg-charcoal {
    background-color: #1a1a1a;
}

.footer-link {
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary) !important;
    padding-left: 5px;
}

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

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

/* Details Page styling */
.product-detail-img-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--cream);
    box-shadow: var(--shadow);
}

.product-detail-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.price-box {
    background-color: var(--cream);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

/* Breadcrumbs */
.breadcrumb-premium {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Toast System */
.toast-premium {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 10px 45px rgba(0,0,0,0.12) !important;
    padding: 0.5rem !important;
}

.toast-header-premium {
    background: transparent !important;
    border-bottom: none !important;
    font-weight: 700;
    color: var(--primary);
}

/* Back to Top */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(212, 106, 67, 0.3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

/* Skeleton Loading Effect */
.skeleton {
    animation: skeleton-loading 1.2s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% { background-color: #f2ede4; }
    100% { background-color: #e5dfd5; }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background-color: var(--cream);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.empty-state-icon {
    font-size: 3.5rem;
    color: #cdc3b4;
    margin-bottom: 1.5rem;
}

/* Accessibility focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
