/* ============================================
   USTA KUNDURA - Custom Styles
   Premium Handcrafted Leather Shoes
   ============================================ */

/* --- Base & Typography --- */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-serif {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.body-text {
    font-family: 'Lora', Georgia, serif;
}

/* --- Leather Texture Backgrounds --- */
.leather-texture {
    background-color: #2C1810;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(193, 127, 89, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 69, 19, 0.06) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C17F59' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.leather-grain {
    background-color: #FDF8F4;
    background-image:
        radial-gradient(ellipse at 30% 70%, rgba(193, 127, 89, 0.05) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%232C1810' fill-opacity='0.02'%3E%3Cpath d='M20 20c0-1.105.895-2 2-2s2 .895 2 2-.895 2-2 2-2-.895-2-2zm-10 0c0-1.105.895-2 2-2s2 .895 2 2-.895 2-2 2-2-.895-2-2zm20 0c0-1.105.895-2 2-2s2 .895 2 2-.895 2-2 2-2-.895-2-2z'/%3E%3C/g%3E%3C/svg%3E");
}

.warm-gradient {
    background: linear-gradient(135deg, #FDF8F4 0%, #F5E6D3 50%, #FDF8F4 100%);
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, #2C1810 0%, #3D2317 30%, #2C1810 60%, #1a0f0a 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(193, 127, 89, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(139, 69, 19, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C17F59' fill-opacity='0.03'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* --- Card Styles --- */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(193, 127, 89, 0.1);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(44, 24, 16, 0.12);
    border-color: rgba(193, 127, 89, 0.3);
}

.product-card .product-image {
    overflow: hidden;
}

.product-card:hover .product-image img,
.product-card:hover .product-image .product-placeholder {
    transform: scale(1.05);
}

.product-placeholder {
    transition: transform 0.5s ease;
    background: linear-gradient(135deg, #DEB887 0%, #C17F59 50%, #8B4513 100%);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    position: relative;
    border-left: 3px solid #C17F59;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: rgba(193, 127, 89, 0.15);
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1;
}

/* --- Section Dividers --- */
.stitch-divider {
    position: relative;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        #C17F59 0px,
        #C17F59 8px,
        transparent 8px,
        transparent 14px
    );
    opacity: 0.4;
}

.ornamental-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ornamental-divider::before,
.ornamental-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C17F59, transparent);
}

/* --- Buttons --- */
.btn-leather {
    background-color: #C17F59;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-leather:hover {
    background-color: #8B4513;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.btn-leather-outline {
    border: 2px solid #C17F59;
    color: #C17F59;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.btn-leather-outline:hover {
    background-color: #C17F59;
    color: white;
}

/* --- Process Steps --- */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -50%;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        #C17F59 0px,
        #C17F59 5px,
        transparent 5px,
        transparent 10px
    );
    opacity: 0.3;
}

.process-step:last-child::after {
    display: none;
}

/* --- Form Elements --- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(193, 127, 89, 0.3);
    border-radius: 0.375rem;
    background: white;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    color: #2C1810;
}

.form-input:focus {
    outline: none;
    border-color: #C17F59;
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.form-input::placeholder {
    color: #A0522D;
    opacity: 0.5;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2C1810;
    font-size: 0.875rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23C17F59'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* --- Category Tabs --- */
.category-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.category-tab:hover {
    background-color: rgba(193, 127, 89, 0.1);
    border-color: rgba(193, 127, 89, 0.3);
}

.category-tab.active {
    background-color: #C17F59;
    color: white;
    border-color: #C17F59;
}

/* --- Blog Cards --- */
.blog-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(44, 24, 16, 0.1);
}

.blog-card .blog-image {
    overflow: hidden;
}

.blog-card:hover .blog-image img,
.blog-card:hover .blog-image .blog-placeholder {
    transform: scale(1.05);
}

.blog-placeholder {
    transition: transform 0.5s ease;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }

/* --- Measurement Guide --- */
.measurement-step {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3.5rem;
}

.measurement-step::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #C17F59;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.measurement-guide {
    counter-reset: step-counter;
}

/* --- Feature Icons --- */
.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, rgba(193, 127, 89, 0.1) 0%, rgba(193, 127, 89, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(193, 127, 89, 0.2);
    transition: all 0.3s ease;
}

.feature-icon:hover {
    background: linear-gradient(135deg, #C17F59 0%, #8B4513 100%);
    border-color: transparent;
}

.feature-icon:hover svg {
    color: white;
}

/* --- Breadcrumb --- */
.breadcrumb a {
    color: #A0522D;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #C17F59;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8B4513;
}

/* --- Selection --- */
::selection {
    background-color: rgba(193, 127, 89, 0.2);
    color: #2C1810;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }

    .process-step::after {
        display: none;
    }

    .stitch-divider {
        margin: 2rem auto;
        width: 80%;
    }
}

/* --- Print Styles --- */
@media print {
    nav, footer, .newsletter-section, #scrollTopBtn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* ============================================
   Responsive Overflow & Text Protection
   ============================================ */

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Break long words/URLs to prevent overflow */
body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

p, li, td, th, span, a, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
table {
    max-width: 100%;
}

.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Prevent pre/code blocks from overflowing */
pre, code {
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

