/**
 * BOOTSTRAP 5 CUSTOM THEME & UTILITIES
 * Replaces custom style.css
 * ANKSAN Sac Metal - Professional Design
 */

:root {
    --primary: #c28e3e;
    --secondary: #000000;
    --tertiary: #949399;
    --light: #f9f9f9;
    --border: #e0e0e0;
    --text: #333;
    --text-light: #666;
    
    /* Bootstrap color variables */
    --bs-primary: #c28e3e;
    --bs-secondary: #000000;
    --bs-tertiary: #949399;
    --bs-light: #f9f9f9;
    --bs-border-color: #e0e0e0;
    --bs-body-color: #333;
    --bs-body-bg: #fff;
    
    /* Custom spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
}

/* ============================================
   RESET & GLOBAL STYLES
   ============================================ */

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #fff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   BUTTON CUSTOM STYLES (Bootstrap Extensions)
   ============================================ */

.btn {
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

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

.btn-primary:hover {
    background-color: #b8793f;
    border-color: #b8793f;
    color: white;
}

.btn-primary:active,
.btn-primary.active,
.btn-primary:focus,
.btn-primary:focus-visible {
    background-color: #a86a3a;
    border-color: #a86a3a;
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(194, 142, 62, 0.5);
}

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

.btn-secondary:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: white;
}

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

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

.btn-large {
    padding: 12px 28px;
    font-size: 1rem;
    min-width: 160px;
}

.btn-small {
    padding: 6px 16px;
    font-size: 0.875rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(194, 142, 62, 0.1);
    padding: 12px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    margin: 0 8px;
    position: relative;
    transition: all 0.3s;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.navbar-toggler {
    border-color: var(--primary);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(194, 142, 62, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23c28e3e' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile menu */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        border-top: 1px solid var(--border);
        margin-top: 10px;
        border-radius: 8px;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 0;
    }
}

/* ============================================
   HERO SECTION (Carousel/Slider)
   ============================================ */

.carousel {
    border-radius: 12px;
    overflow: hidden;
}

.carousel-item {
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-caption-inner {
    text-align: center;
    color: white;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-caption p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: auto;
    background: none;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(194, 142, 62, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .carousel-item {
        min-height: 300px;
    }
    
    .carousel-caption h2 {
        font-size: 1.75rem;
    }
    
    .carousel-caption p {
        font-size: 0.95rem;
    }
}

/* ============================================
   PRODUCT CARDS & GRID
   ============================================ */

.product-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.product-card-img-top {
    height: 250px;
    object-fit: cover;
    background: var(--light);
}

.product-card-body {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.product-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(194, 142, 62, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    width: fit-content;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.product-card-text {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 12px;
    flex-grow: 1;
}

.product-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.product-link:hover {
    gap: 10px;
    color: var(--secondary);
}

/* Product Grid - Responsive */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SECTION STYLING
   ============================================ */

.section {
    padding: 60px 0;
}

.section.section-light {
    background: var(--light);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(194, 142, 62, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-control {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(194, 142, 62, 0.15);
    color: var(--text);
}

.form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 4px;
}

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

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

/* Form validation */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    border: none;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ff9800;
    border-left: 4px solid #ff9800;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border-left: 4px solid #17a2b8;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: var(--light);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Feature card */
.feature-card {
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 35px rgba(194, 142, 62, 0.15);
    transform: translateY(-4px);
}

.feature-card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-card-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--secondary);
    color: #e0e0e0;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-section-title {
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.footer-link {
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

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

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
    text-decoration: none;
}

.footer-social-icon:hover {
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 30px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* ============================================
   UTILITIES & HELPERS
   ============================================ */

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-light {
    background-color: var(--light) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* Spacing utilities (extending Bootstrap) */
.gap-lg {
    gap: var(--spacing-lg) !important;
}

.gap-xl {
    gap: var(--spacing-xl) !important;
}

.p-lg {
    padding: var(--spacing-lg) !important;
}

.p-xl {
    padding: var(--spacing-xl) !important;
}

.m-lg {
    margin: var(--spacing-lg) !important;
}

.m-xl {
    margin: var(--spacing-xl) !important;
}

/* Flex utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-col {
    display: flex;
    flex-direction: column;
}

/* Rounded utilities */
.rounded-lg {
    border-radius: 8px !important;
}

.rounded-xl {
    border-radius: 12px !important;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.shadow-md {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 991px) {
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-card-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 20px 0;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .feature-card-icon {
        font-size: 1.75rem;
    }
}

/* Breadcrumbs */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item {
    color: var(--text-light);
}

.breadcrumb-item.active {
    color: var(--text);
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    gap: 8px;
}

.page-link {
    color: var(--primary);
    border-color: var(--border);
    border-radius: 4px;
}

.page-link:hover {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
}

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

.badge-secondary {
    background-color: var(--secondary);
    color: white;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 16px;
}

/* Loading spinner override */
.spinner-border {
    color: var(--primary);
}

/* ============================================
   TRANSITIONS & ANIMATIONS
   ============================================ */

* {
    transition-timing-function: ease;
}

.transition-smooth {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

/* Fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Slide up animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease;
}

/* ============================================
   PRODUCT CARD LINK
   ============================================ */

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.product-card-link:hover .product-card {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(194, 142, 62, 0.2);
}

.product-card-link:hover .product-link {
    color: var(--primary);
    transform: translateX(4px);
}
