/**
 * Main Styles for Shahy Crafts
 * Author: Shahy Crafts Team
 */

/* =========== Global Styles =========== */
:root {
    --color-cream: #f8f4e9;
    --color-beige: #e8dacb;
    --color-gold: #c4a264;
    --color-gold-dark: #b08d4f;
    --color-brown: #8b4513;
    --color-charcoal: #333333;
    --color-light-gray: #f4f4f4;
    --font-primary: 'Tajawal', sans-serif;
    --transition-speed: 0.3s;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-cream);
    color: var(--color-charcoal);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--color-brown);
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--color-gold);
}

img {
    max-width: 100%;
}

.btn {
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

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

.btn-gold:hover {
    background-color: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
    color: white;
}

.btn-outline-gold {
    background-color: transparent;
    border-color: var(--color-gold);
    color: var(--color-gold);
}

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

.section-title {
    position: relative;
    margin-bottom: 40px;
    text-align: center;
}

.section-title h2 {
    display: inline-block;
    position: relative;
    color: var(--color-brown);
    font-size: 2rem;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--color-gold);
}

.ornamental-border {
    border: 8px solid transparent;
    border-image: url('../images/border.png') 30 round;
}

/* =========== Header & Navigation =========== */
.top-bar {
    background-color: var(--color-beige);
    color: var(--color-charcoal);
    font-size: 0.9rem;
}

.social-icons a {
    color: var(--color-charcoal);
    margin-left: 10px;
    font-size: 1rem;
}

.social-icons a:hover {
    color: var(--color-gold);
}

.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    max-height: 80px;
}

.logo-wrapper {
    text-align: center;
}

.search-form .form-control {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    border-color: var(--color-beige);
}

.search-form .btn {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.header-icons {
    display: flex;
    align-items: center;
}

.header-icon {
    color: var(--color-charcoal);
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.header-icon:hover {
    color: var(--color-gold);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--color-gold);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.main-navigation {
    background-color: var(--color-brown);
}

.main-navigation .navbar-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.main-navigation .nav-link {
    color: white;
    font-weight: 500;
    padding: 15px;
    transition: all var(--transition-speed) ease;
}

.main-navigation .nav-link:hover,
.main-navigation .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--color-gold);
}

.mobile-search {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-search {
        display: block;
        background-color: var(--color-light-gray);
    }
}

/* Cart Dropdown */
.cart-dropdown {
    position: relative;
}

.cart-dropdown-menu {
    width: 320px;
    padding: 15px;
}

.cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-light-gray);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    margin-left: 10px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h6 {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--color-gold-dark);
}

.cart-item-remove {
    color: #dc3545;
    font-size: 0.8rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-light-gray);
    font-weight: 700;
}

.cart-buttons {
    display: flex;
    justify-content: space-between;
}

.empty-cart {
    text-align: center;
    padding: 20px 0;
}

.empty-cart i {
    font-size: 3rem;
    color: var(--color-beige);
    margin-bottom: 10px;
}

/* =========== Hero Section =========== */
.hero-section {
    background-color: var(--color-beige);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--color-brown);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-charcoal);
    margin-bottom: 30px;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-image img {
    max-height: 400px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease;
}

.hero-image.animate img {
    opacity: 1;
    transform: translateY(0);
}

.hero-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    background-color: var(--color-gold);
    opacity: 0.1;
    border-radius: 50%;
}

.hero-decoration-1 {
    top: -100px;
    right: 10%;
}

.hero-decoration-2 {
    bottom: -50px;
    left: 5%;
}

/* =========== Featured Products =========== */
.featured-products {
    padding: 80px 0;
}

.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--color-gold);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.product-badge.discount {
    background-color: #dc3545;
}

.product-wishlist {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    opacity: 0;
    transform: translateY(-10px);
}

.product-card:hover .product-wishlist {
    opacity: 1;
    transform: translateY(0);
}

.product-wishlist i {
    color: #dc3545;
}

.product-content {
    padding: 20px;
}

.product-category {
    color: var(--color-gold);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    height: 50px;
    overflow: hidden;
}

.product-title a {
    color: var(--color-charcoal);
}

.product-title a:hover {
    color: var(--color-gold);
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-brown);
}

.old-price {
    text-decoration: line-through;
    color: #6c757d;
    margin-right: 10px;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.9rem;
}

/* =========== Categories Section =========== */
.categories-section {
    padding: 60px 0;
    background-color: var(--color-light-gray);
}

.category-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 200px;
    margin-bottom: 30px;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: white;
    transition: all 0.3s ease;
}

.category-title {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

.category-card:hover .category-content {
    background: linear-gradient(to top, rgba(196, 162, 100, 0.8), rgba(196, 162, 100, 0));
}

/* =========== Discount Section =========== */
.discount-section {
    padding: 80px 0;
    background-color: var(--color-beige);
    position: relative;
    overflow: hidden;
}

.discount-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    background-color: var(--color-gold);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
}

.discount-decoration-1 {
    top: -150px;
    right: -100px;
}

.discount-decoration-2 {
    bottom: -150px;
    left: -100px;
}

.discount-content {
    position: relative;
    z-index: 1;
}

/* =========== Features Section =========== */
.features-section {
    padding: 60px 0;
}

.feature-box {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease;
}

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

.feature-icon {
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 20px;
}

.feature-title {
    margin-bottom: 15px;
    color: var(--color-brown);
}

/* =========== Footer =========== */
.site-footer {
    background-color: var(--color-charcoal);
    color: #fff;
}

.footer-top {
    background-color: var(--color-charcoal);
}

.footer-logo img {
    max-height: 80px;
}

.footer-about {
    margin-bottom: 20px;
    color: rgba(255,255,255,0.7);
}

.footer-social {
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-left: 10px;
    color: white;
    transition: all var(--transition-speed) ease;
}

.social-icon:hover {
    background-color: var(--color-gold);
    color: white;
}

.widget-title {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-gold);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: all var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--color-gold);
    padding-right: 5px;
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-item i {
    color: var(--color-gold);
    margin-left: 10px;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    background-color: #222;
    font-size: 0.9rem;
}

.payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 25px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
    margin-right: 5px;
    color: white;
}

/* =========== Product Details Page =========== */
.product-details {
    padding: 60px 0;
}

.product-gallery {
    position: relative;
    margin-bottom: 30px;
}

.product-main-image {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 15px;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbs {
    display: flex;
}

.product-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-left: 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: all var(--transition-speed) ease;
}

.product-thumb:hover,
.product-thumb.active {
    opacity: 1;
    border: 2px solid var(--color-gold);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.product-info-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-brown);
}

.product-info-price {
    font-size: 1.5rem;
    color: var(--color-gold-dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.product-info-old-price {
    text-decoration: line-through;
    color: #6c757d;
    margin-right: 10px;
    font-size: 1.1rem;
}

.product-info-meta {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-light-gray);
}

.product-info-meta-item {
    margin-bottom: 10px;
}

.product-info-meta-label {
    font-weight: 700;
    color: var(--color-charcoal);
    margin-left: 5px;
}

.product-info-meta-value {
    color: var(--color-brown);
}

.product-info-description {
    margin-bottom: 30px;
    color: var(--color-charcoal);
}

.product-info-quantity {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-info-quantity-label {
    margin-left: 10px;
    font-weight: 700;
}

.quantity-input {
    width: 100px;
}

.product-info-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-info-dimension {
    display: flex;
    margin-bottom: 10px;
}

.product-info-dimension-label {
    width: 100px;
    font-weight: 700;
}

/* =========== Cart & Checkout =========== */
.cart-section,
.checkout-section {
    padding: 60px 0;
}

.cart-table {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.cart-table table {
    margin-bottom: 0;
}

.cart-product-image {
    width: 80px;
    height: 80px;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.cart-quantity input {
    width: 70px;
    text-align: center;
}

.cart-summary {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

.cart-summary-title {
    color: var(--color-brown);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.cart-summary-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-gold);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-light-gray);
}

.cart-summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-brown);
    border-bottom: none;
}

.checkout-form {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.checkout-title {
    color: var(--color-brown);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.checkout-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-gold);
}

/* =========== User Account Pages =========== */
.account-section {
    padding: 60px 0;
}

.account-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.account-card-title {
    color: var(--color-brown);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.account-card-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-gold);
}

.account-table {
    width: 100%;
}

.account-info-list {
    list-style: none;
    padding: 0;
}

.account-info-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-light-gray);
    display: flex;
}

.account-info-label {
    font-weight: 700;
    width: 150px;
}

.account-nav {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.account-nav-link {
    display: block;
    padding: 15px 20px;
    color: var(--color-charcoal);
    border-bottom: 1px solid var(--color-light-gray);
}

.account-nav-link:last-child {
    border-bottom: none;
}

.account-nav-link.active,
.account-nav-link:hover {
    background-color: var(--color-beige);
    color: var(--color-brown);
    padding-right: 25px;
}

.account-nav-link i {
    margin-left: 10px;
    color: var(--color-gold);
}

/* =========== Auth Pages =========== */
.auth-section {
    padding: 80px 0;
    background-color: var(--color-light-gray);
}

.auth-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.auth-header {
    background-color: var(--color-brown);
    color: white;
    padding: 20px;
    text-align: center;
}

.auth-title {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.auth-body {
    padding: 30px;
}

/* =========== Back to Top Button =========== */
.back-to-top {
    position: fixed;
    bottom: -60px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    opacity: 0;
    z-index: 999;
}

.back-to-top.show {
    bottom: 30px;
    opacity: 1;
}

.back-to-top:hover {
    background-color: var(--color-gold-dark);
}

/* =========== Toast Notifications =========== */
.toast {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.toast-header {
    background-color: var(--color-brown);
    color: white;
}

.toast-body {
    padding: 15px;
}

/* =========== Loading Animations =========== */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-product {
    height: 300px;
    margin-bottom: 30px;
}

/* =========== Responsive Styles =========== */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-image img {
        max-height: 300px;
    }
    
    .product-main-image {
        height: 350px;
    }
}

@media (max-width: 767.98px) {
    .section-title h2 {
        font-size: 1.7rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .product-thumb {
        width: 60px;
        height: 60px;
    }
    
    .account-info-item {
        flex-direction: column;
    }
    
    .account-info-label {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
}
