/*
Theme Name: Sora Shop - Arabic WooCommerce Theme
Description: A modern Arabic WooCommerce theme with RTL support, featuring beautiful typography and responsive design optimized for Arabic e-commerce.
Version: 1.0.0
Author: Your Name
Text Domain: sora-shop
Domain Path: /languages/
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, two-columns, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, featured-images, flexible-header, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, rtl-language-support, arabic
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    direction: rtl;
    text-align: right;
}

/* Arabic Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #2c3e50;
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
    text-decoration: none;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #e74c3c;
}

/* WooCommerce Specific Styles */
.woocommerce {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

.woocommerce .products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.woocommerce .product {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.woocommerce .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.woocommerce .product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.woocommerce .product .woocommerce-loop-product__title {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.woocommerce .price {
    padding: 0 1rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
}

.woocommerce .price del {
    color: #999;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Buttons */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: #c0392b;
    color: #fff;
}

/* Cart and Checkout */
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .checkout {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.woocommerce table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.woocommerce table.shop_table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Forms */
.woocommerce .form-row {
    margin-bottom: 1rem;
}

.woocommerce .form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.woocommerce .form-row input,
.woocommerce .form-row select,
.woocommerce .form-row textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.woocommerce .form-row input:focus,
.woocommerce .form-row select:focus,
.woocommerce .form-row textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .woocommerce .products {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Arabic RTL Specific Adjustments */
.woocommerce .star-rating {
    direction: ltr;
    text-align: left;
}

.woocommerce .star-rating span {
    direction: rtl;
}

/* Enhanced Arabic Typography */
body, input, textarea, select, button {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
}

/* Arabic Text Direction and Alignment */
.entry-content,
.woocommerce .product .woocommerce-loop-product__title,
.woocommerce .product .price,
.woocommerce .product .button,
.entry-meta,
.entry-footer {
    text-align: right;
    direction: rtl;
}

/* Arabic Numbers and Currency */
.woocommerce .price .woocommerce-Price-amount {
    font-family: 'Cairo', Arial, sans-serif;
    font-weight: 600;
}

/* Arabic Menu Styling */
.main-navigation ul {
    direction: rtl;
}

.main-navigation li {
    margin-left: 0;
    margin-right: 2rem;
}

.main-navigation li:last-child {
    margin-right: 0;
}

/* Arabic Form Styling */
.woocommerce .form-row input,
.woocommerce .form-row select,
.woocommerce .form-row textarea {
    text-align: right;
    direction: rtl;
}

.woocommerce .form-row label {
    text-align: right;
    float: right;
}

/* Arabic Table Styling */
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    text-align: right;
}

.woocommerce table.shop_table .product-thumbnail {
    text-align: center;
}

/* Arabic Button Styling */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button {
    font-family: 'Cairo', Arial, sans-serif;
    font-weight: 600;
}

/* Arabic Breadcrumb */
.woocommerce-breadcrumb {
    direction: rtl;
    text-align: right;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.woocommerce-breadcrumb a {
    color: #e74c3c;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* Arabic Pagination */
.woocommerce nav.woocommerce-pagination {
    text-align: center;
    margin: 2rem 0;
}

.woocommerce nav.woocommerce-pagination ul {
    display: inline-block;
    white-space: nowrap;
    padding: 0;
    clear: both;
    border: 1px solid #d3ced2;
    border-right: 0;
    margin: 1px;
}

.woocommerce nav.woocommerce-pagination ul li {
    border-right: 1px solid #d3ced2;
    padding: 0;
    margin: 0;
    float: right;
    display: inline;
    overflow: hidden;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    margin: 0;
    text-decoration: none;
    line-height: 1;
    font-size: 1em;
    font-weight: normal;
    padding: 0.75em;
    min-width: 1em;
    display: block;
}

/* Arabic Widget Styling */
.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.widget-title {
    font-family: 'Cairo', Arial, sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: right;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: #e74c3c;
}

/* Arabic Sidebar */
.sidebar {
    direction: rtl;
    text-align: right;
}

/* Arabic Search Form */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    padding: 12px 45px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    width: 100%;
    text-align: right;
    direction: rtl;
}

.search-submit {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #f0f0f0;
}

/* Arabic Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Arabic Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.cart-link:hover {
    background: #f0f0f0;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cart-link.pulse {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Arabic Product Grid */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: right;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product img.zoom-in {
    transform: scale(1.05);
}

/* Arabic Single Product */
.single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.product-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.product-gallery img:hover {
    opacity: 0.7;
}

.product-details {
    direction: rtl;
    text-align: right;
}

.product-title {
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.product-meta {
    margin-bottom: 2rem;
}

.product-meta h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.product-meta ul {
    list-style: none;
    padding: 0;
}

.product-meta li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.product-meta li:last-child {
    border-bottom: none;
}

.product-actions {
    margin-bottom: 2rem;
}

.add-to-cart-form {
    margin-bottom: 2rem;
}

.product-share h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-buttons a {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.share-buttons a:hover {
    background: #e9ecef;
}

/* Arabic Related Products */
.related-products {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-products h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.related-product-item {
    text-align: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.related-product-item:hover {
    transform: translateY(-3px);
}

.related-product-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-product-item h4 {
    padding: 1rem;
    font-size: 1rem;
    margin: 0;
}

.related-product-item .price {
    padding: 0 1rem 1rem;
    font-weight: bold;
    color: #e74c3c;
}

/* Loading and Spinner */
.woocommerce .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and Error Messages */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-right: 4px solid;
}

.woocommerce .woocommerce-message {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.woocommerce .woocommerce-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.woocommerce .woocommerce-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}
